Make sure resume files are fsync'd
This commit is contained in:
parent
9a4bbb771e
commit
3072fc48da
@ -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…
x
Reference in New Issue
Block a user