forked from TrueCloudLab/rclone
config: use absolute ConfigPath to ensure newly written config is on the same mount - fixes #1569
This commit is contained in:
parent
b523cfc01d
commit
40f24e0ea3
1 changed files with 4 additions and 2 deletions
|
@ -375,8 +375,6 @@ func LoadConfig() {
|
|||
Config.TPSLimitBurst = *tpsLimitBurst
|
||||
Config.BufferSize = bufferSize
|
||||
|
||||
ConfigPath = *configFile
|
||||
|
||||
Config.TrackRenames = *trackRenames
|
||||
|
||||
switch {
|
||||
|
@ -414,6 +412,10 @@ func LoadConfig() {
|
|||
|
||||
// Load configuration file.
|
||||
var err error
|
||||
ConfigPath, err = filepath.Abs(*configFile)
|
||||
if err != nil {
|
||||
ConfigPath = *configFile
|
||||
}
|
||||
configData, err = loadConfigFile()
|
||||
if err == errorConfigFileNotFound {
|
||||
Logf(nil, "Config file %q not found - using defaults", ConfigPath)
|
||||
|
|
Loading…
Add table
Reference in a new issue