luci-app-rclone: sync with upstream source

This commit is contained in:
CN_SZTL 2020-05-02 16:45:46 +08:00
parent 02ef69f428
commit 4c6ab3beeb
No known key found for this signature in database
GPG Key ID: 6850B6345C862176
4 changed files with 45 additions and 6 deletions

View File

@ -13,7 +13,7 @@ LUCI_TITLE:=LuCI support for Rclone
LUCI_DEPENDS:=+rclone +rclone-webui-react
LUCI_PKGARCH:=all
PKG_NAME:=luci-app-rclone
PKG_VERSION:=1.2.21
PKG_VERSION:=1.3.21
PKG_RELEASE:=1
PKG_LICENSE:=GPLv3.0+
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>

View File

@ -2,10 +2,10 @@
"luci-app-rclone": {
"description": "Grant UCI access for luci-app-rclone",
"read": {
"uci": [ "rclone" ]
"uci": ["rclone"]
},
"write": {
"uci": [ "rclone" ]
"uci": ["rclone"]
}
}
}

View File

@ -10,13 +10,16 @@
include $(TOPDIR)/rules.mk
PKG_NAME:=rclone
PKG_VERSION:=1.50.2
PKG_VERSION:=1.51.0
PKG_RELEASE:=1
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/rclone/rclone.git
PKG_SOURCE_VERSION:=373fb01725453a980ecb2afd413a16b86e69ab02
PKG_SOURCE_DATE:=20191120
PKG_SOURCE_DATE:=2020-02-01
PKG_SOURCE_VERSION:=43daecd89b21292b112051340317927b42ccbdd3
PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.gz
PKG_MIRROR_HASH:=aca159c81971a9490a6a6c323b67879dccba3860955b66787d91590f4ba8ba29
PKG_LICENSE:=GPLv3
PKG_MAINTAINER:=ElonH <elonhhuang@gmail.com>

View File

@ -0,0 +1,36 @@
diff --git a/fs/config/config.go b/fs/config/config.go
index 53d67ef03..cc5d6436b 100644
--- a/fs/config/config.go
+++ b/fs/config/config.go
@@ -25,7 +25,6 @@ import (
"unicode/utf8"
"github.com/Unknwon/goconfig"
- homedir "github.com/mitchellh/go-homedir"
"github.com/pkg/errors"
"github.com/rclone/rclone/fs"
"github.com/rclone/rclone/fs/accounting"
@@ -133,21 +132,10 @@ func makeConfigPath() string {
}
// Find user's home directory
- homeDir, err := homedir.Dir()
+ homeDir := "/etc"
- // Find user's configuration directory.
- // Prefer XDG config path, with fallback to $HOME/.config.
- // See XDG Base Directory specification
- // https://specifications.freedesktop.org/basedir-spec/latest/),
- xdgdir := os.Getenv("XDG_CONFIG_HOME")
var cfgdir string
- if xdgdir != "" {
- // User's configuration directory for rclone is $XDG_CONFIG_HOME/rclone
- cfgdir = filepath.Join(xdgdir, "rclone")
- } else if homeDir != "" {
- // User's configuration directory for rclone is $HOME/.config/rclone
- cfgdir = filepath.Join(homeDir, ".config", "rclone")
- }
+ cfgdir = filepath.Join(homeDir, "rclone")
// Use rclone.conf from user's configuration directory if already existing
var cfgpath string