mirror of
https://git.deluge-torrent.org/deluge
synced 2025-04-21 03:54:50 +00:00
Make sure resume files are fsync'd
This commit is contained in:
parent
9a4bbb771e
commit
3072fc48da
1 changed files with 2 additions and 0 deletions
|
@ -759,6 +759,8 @@ class Torrent:
|
|||
log.debug("Saving fastresume file: %s", path)
|
||||
fastresume = open(path, "wb")
|
||||
fastresume.write(resume_data)
|
||||
fastresume.flush()
|
||||
os.fsync(fastresume.fileno())
|
||||
fastresume.close()
|
||||
except IOError:
|
||||
log.warning("Error trying to save fastresume file")
|
||||
|
|
Loading…
Add table
Reference in a new issue