From 45f898870fcb28f1e299a5015a9d5f5163dd40c5 Mon Sep 17 00:00:00 2001 From: Calum Lind Date: Wed, 22 May 2013 02:59:55 +0100 Subject: [PATCH] Fix mistake in torrentmanager --- deluge/core/torrentmanager.py | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/deluge/core/torrentmanager.py b/deluge/core/torrentmanager.py index a2f2a4264..9ac9b5c98 100644 --- a/deluge/core/torrentmanager.py +++ b/deluge/core/torrentmanager.py @@ -147,6 +147,7 @@ class TorrentManager(component.Component): self.state_dir = os.path.join(get_config_dir(), "state") if not os.path.exists(self.state_dir): os.makedirs(self.state_dir) + self.temp_file = os.path.join(self.state_dir, ".safe_state_check") # Create the torrents dict { torrent_id: Torrent } self.torrents = {} @@ -213,13 +214,12 @@ class TorrentManager(component.Component): # Get the pluginmanager reference self.plugins = component.get("CorePluginManager") - # Check for temp file - self.temp_file = os.path.join(self.state_dir, ".safe_state_check") + # Check for old temp file to verify safe shutdown if os.path.isfile(self.temp_file): def archive_file(filename): import datetime filepath = os.path.join(self.state_dir, filename) - filepath_bak = state_filepath + ".bak" + filepath_bak = filepath + ".bak" archive_dir = os.path.join(get_config_dir(), "archive") if not os.path.exists(archive_dir): os.makedirs(archive_dir)