mirror of
https://git.deluge-torrent.org/deluge
synced 2025-08-06 08:28:39 +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)
|
log.debug("Saving fastresume file: %s", path)
|
||||||
fastresume = open(path, "wb")
|
fastresume = open(path, "wb")
|
||||||
fastresume.write(resume_data)
|
fastresume.write(resume_data)
|
||||||
|
fastresume.flush()
|
||||||
|
os.fsync(fastresume.fileno())
|
||||||
fastresume.close()
|
fastresume.close()
|
||||||
except IOError:
|
except IOError:
|
||||||
log.warning("Error trying to save fastresume file")
|
log.warning("Error trying to save fastresume file")
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue