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
|
err = cerr
|
||||||
}
|
}
|
||||||
}()
|
}()
|
||||||
if _, err = io.Copy(out, in); err != nil {
|
_, err = io.Copy(out, in)
|
||||||
return
|
|
||||||
}
|
|
||||||
err = out.Sync()
|
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user