mirror of
https://github.com/rclone/rclone
synced 2025-01-11 14:26:24 +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()
|
_ = enc.Close()
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_ = f.Sync()
|
||||||
err = f.Close()
|
err = f.Close()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return errors.Errorf("Failed to close config file: %v", err)
|
return errors.Errorf("Failed to close config file: %v", err)
|
||||||
|
Loading…
Reference in New Issue
Block a user