Amend check for files and delete if not used any more

Fixes: https://launchpad.net/bugs/891781
This commit is contained in:
Tim Bentley 2011-11-18 19:34:04 +00:00
parent 2247a67442
commit d5331f50b3

View File

@ -370,7 +370,7 @@ class ThemeManager(QtGui.QWidget):
def onExportTheme(self):
"""
Save the theme in a zip file
Export the theme in a zip file
"""
item = self.themeListWidget.currentItem()
if item is None:
@ -625,7 +625,7 @@ class ThemeManager(QtGui.QWidget):
theme_dir = os.path.join(self.path, name)
check_directory_exists(theme_dir)
theme_file = os.path.join(theme_dir, name + u'.xml')
if imageTo and self.oldBackgroundImage and \
if self.oldBackgroundImage and \
imageTo != self.oldBackgroundImage:
delete_file(self.oldBackgroundImage)
outfile = None