vm/qubesvm: fix missing icon handling in clone_disk_files()

Check for icon existence, not a directory for it.
This commit is contained in:
Marek Marczykowski-Górecki 2018-04-06 12:10:50 +02:00
parent 2706562a6f
commit 93b2424867
No known key found for this signature in database
GPG Key ID: 063938BA42CFA724

View File

@ -1438,7 +1438,7 @@ class QubesVM(qubes.vm.mix.net.NetVMMixin, qubes.vm.BaseVM):
assert self.volumes != {}
if src.icon_path is not None \
and os.path.exists(src.dir_path) \
and os.path.exists(src.icon_path) \
and self.icon_path is not None:
if os.path.islink(src.icon_path):
icon_path = os.readlink(src.icon_path)