Skip to content

"rsync for cloud storage" - Google Drive, S3, Dropbox, Backblaze B2, One Drive, Swift, Hubic, Wasabi, Google Cloud Storage, Azure Blob, Azure Files, Yandex Files

config: use absolute ConfigPath to ensure newly written config is on the same mount - fixes #1569

Stefan Breunig40f24e0ea3d7
diff --git a/fs/config.go b/fs/config.go
index 291afc210..d829a0336 100644
--- a/fs/config.go
+++ b/fs/config.go
@@ -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)