mirror of
https://github.com/rclone/rclone
synced 2024-12-23 14:23:44 +01:00
config: fsync the config file after writing #3411
This should help with data integrity
This commit is contained in:
parent
1e9b8e043a
commit
47e2d5c415
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user