config: set RCLONE_CONFIG_DIR for use in config files and subprocesses
See: https://forum.rclone.org/t/relative-path-in-rclone-config-service-account-json/16693
This commit is contained in:
parent
50e31c6636
commit
b62d08d136
2 changed files with 8 additions and 4 deletions
|
@ -213,6 +213,9 @@ func makeConfigPath() string {
|
|||
|
||||
// LoadConfig loads the config file
|
||||
func LoadConfig() {
|
||||
// Set RCLONE_CONFIG_DIR for backend config and subprocesses
|
||||
_ = os.Setenv("RCLONE_CONFIG_DIR", filepath.Dir(ConfigPath))
|
||||
|
||||
// Load configuration file.
|
||||
var err error
|
||||
configFile, err = loadConfigFile()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue