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: fsync the config file after writing #3411

Nick Craig-Wood47e2d5c41531
diff --git a/fs/config/config.go b/fs/config/config.go
index c7793f412..53d67ef03 100644
--- a/fs/config/config.go
+++ b/fs/config/config.go
@@ -558,6 +558,7 @@ func saveConfig() error {
_ = enc.Close()
}
+ _ = f.Sync()
err = f.Close()
if err != nil {
return errors.Errorf("Failed to close config file: %v", err)