diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index c08ebc3d4..afbe34382 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -541,6 +541,8 @@ class TorrentManager(component.Component): os.path.join(self.config["state_location"], "torrents.state.new"), "wb") cPickle.dump(state, state_file) + state_file.flush() + os.fsync(state_file.fileno()) state_file.close() except IOError: log.warning("Unable to save state file.")