From 3072fc48da4984f7252d7a24974722936f47c133 Mon Sep 17 00:00:00 2001 From: Andrew Resch Date: Sun, 8 Mar 2009 02:35:58 +0000 Subject: [PATCH] Make sure resume files are fsync'd --- deluge/core/torrent.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/deluge/core/torrent.py b/deluge/core/torrent.py index b05a25c12..5741f655e 100644 --- a/deluge/core/torrent.py +++ b/deluge/core/torrent.py @@ -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")