mirror of
https://github.com/octoleo/syncthing.git
synced 2024-11-10 15:20:56 +00:00
lib/osutil: Remove unnecessary fsync in Copy()
Fsyncing the file has a small performance penalty and seems unnecessary. The file will be fsynced anyway, when the changes are commited to the database. GitHub-Pull-Request: https://github.com/syncthing/syncthing/pull/3749
This commit is contained in:
parent
cc9a9fb390
commit
f1e83a57cd
@ -172,10 +172,7 @@ func copyFileContents(src, dst string) (err error) {
|
||||
err = cerr
|
||||
}
|
||||
}()
|
||||
if _, err = io.Copy(out, in); err != nil {
|
||||
return
|
||||
}
|
||||
err = out.Sync()
|
||||
_, err = io.Copy(out, in)
|
||||
return
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user