appicons: fix directory creation and removal (when missing)
This commit is contained in:
parent
92f6e29f43
commit
d8145677d6
@ -121,6 +121,7 @@ def QubesVm_appicons_create(self, srcdir=None):
|
|||||||
self.label.color)
|
self.label.color)
|
||||||
|
|
||||||
def QubesVm_appicons_remove(self):
|
def QubesVm_appicons_remove(self):
|
||||||
|
if not os.path.exists(self.appmenus_icons_dir): return
|
||||||
for icon in os.listdir(self.appmenus_icons_dir):
|
for icon in os.listdir(self.appmenus_icons_dir):
|
||||||
os.unlink(os.path.join(self.appmenus_icons_dir, icon))
|
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):
|
if not os.path.exists(vm.appmenus_templates_dir):
|
||||||
os.mkdir(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
|
# Create new/update existing templates
|
||||||
if options.verbose:
|
if options.verbose:
|
||||||
print >> sys.stderr, "--> Got {0} appmenus, storing to disk".format(str(len(new_appmenus)))
|
print >> sys.stderr, "--> Got {0} appmenus, storing to disk".format(str(len(new_appmenus)))
|
||||||
|
Loading…
Reference in New Issue
Block a user