From 738729e779439cfb15d05d8836fd8668c9726ce6 Mon Sep 17 00:00:00 2001 From: Andreas Preikschat Date: Sat, 7 May 2011 13:22:34 +0200 Subject: [PATCH] re ordering --- openlp/core/ui/mainwindow.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/openlp/core/ui/mainwindow.py b/openlp/core/ui/mainwindow.py index 181cab1aa..a115d8905 100644 --- a/openlp/core/ui/mainwindow.py +++ b/openlp/core/ui/mainwindow.py @@ -657,10 +657,11 @@ class MainWindow(QtGui.QMainWindow, Ui_MainWindow): plugin.firstTime() Receiver.send_message(u'openlp_process_events') temp_dir = os.path.join(unicode(gettempdir()), u'openlp') - if os.path.exists(temp_dir): - for filename in os.listdir(temp_dir): - delete_file(os.path.join(temp_dir, filename)) - os.removedirs(temp_dir) + if not os.path.exists(temp_dir): + return + for filename in os.listdir(temp_dir): + delete_file(os.path.join(temp_dir, filename)) + os.removedirs(temp_dir) def blankCheck(self): """