From 25e12f17757e707dc6dc2dfa476fdc1f65a44675 Mon Sep 17 00:00:00 2001 From: Virgil Dupras Date: Fri, 5 Feb 2010 17:24:20 +0100 Subject: [PATCH] [#83 state:fixed] Fixed crash on quitting if the appdata dir has been removed. --- core/app.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/app.py b/core/app.py index 4b8c655d..5a3b2cc4 100644 --- a/core/app.py +++ b/core/app.py @@ -212,10 +212,14 @@ class DupeGuru(RegistrableApplication): changed_groups.add(g) def save(self): + if not op.exists(self.appdata): + os.makedirs(self.appdata) self.directories.save_to_file(op.join(self.appdata, 'last_directories.xml')) self.results.save_to_xml(op.join(self.appdata, 'last_results.xml')) def save_ignore_list(self): + if not op.exists(self.appdata): + os.makedirs(self.appdata) p = op.join(self.appdata, 'ignore_list.xml') self.scanner.ignore_list.save_to_xml(p)