From a074ef17ceb1dcd5ab57c66406647bf45e51dc2f Mon Sep 17 00:00:00 2001 From: Marcos Pinto Date: Fri, 8 Jun 2007 01:48:12 +0000 Subject: [PATCH] tooltips touchupfix the problem where torrents disappear after an improper shutdown - andar --- src/core.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/core.py b/src/core.py index 4f9e5c196..c7c4e8a23 100644 --- a/src/core.py +++ b/src/core.py @@ -696,6 +696,11 @@ class Manager: if no_space: self.apply_queue() + # Pickle the state so if we experience a crash, the latest state is available + print "Pickling state..." + output = open(os.path.join(self.base_dir, STATE_FILENAME), 'wb') + pickle.dump(self.state, output) + output.close() return ret