appmenus: clone default whitelists for VM type

Don't bother with checking whether it is a template or not - when
cloning VM disk files, copy those files anyway (if exist of course).
This commit is contained in:
Marek Marczykowski-Górecki 2016-08-08 14:38:50 +02:00
parent daf1fd4759
commit fe209dfd24
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -443,9 +443,8 @@ class AppmenusExtension(qubes.ext.Extension):
yield self.template_icons_dir(vm) yield self.template_icons_dir(vm)
if os.path.exists(self.whitelist_path(vm)): if os.path.exists(self.whitelist_path(vm)):
yield self.whitelist_path(vm) yield self.whitelist_path(vm)
if vm.is_template(): for whitelist in (
for whitelist in ( 'vm-' + AppmenusSubdirs.whitelist,
'vm-' + AppmenusSubdirs.whitelist, 'netvm-' + AppmenusSubdirs.whitelist):
'netvm-' + AppmenusSubdirs.whitelist): if os.path.exists(os.path.join(vm.dir_path, whitelist)):
if os.path.exists(os.path.join(vm.dir_path, whitelist)): yield os.path.join(vm.dir_path, whitelist)
yield os.path.join(vm.dir_path, whitelist)