appicons: fix directory creation and removal (when missing)

release2 woju_d8145677
Wojciech Zygmunt Porczyk 10 years ago
parent 92f6e29f43
commit d8145677d6

@ -121,6 +121,7 @@ def QubesVm_appicons_create(self, srcdir=None):
self.label.color)
def QubesVm_appicons_remove(self):
if not os.path.exists(self.appmenus_icons_dir): return
for icon in os.listdir(self.appmenus_icons_dir):
os.unlink(os.path.join(self.appmenus_icons_dir, icon))

@ -216,6 +216,9 @@ def main():
if not os.path.exists(vm.appmenus_templates_dir):
os.mkdir(vm.appmenus_templates_dir)
if not os.path.exists(vm.appmenus_template_icons_dir):
os.mkdir(vm.appmenus_template_icons_dir)
# Create new/update existing templates
if options.verbose:
print >> sys.stderr, "--> Got {0} appmenus, storing to disk".format(str(len(new_appmenus)))

Loading…
Cancel
Save