Skip to content

Commit

Permalink
qubesvm: don't crash VM creation if icon symlink already exists
Browse files Browse the repository at this point in the history
It can be leftover from previous failed attempt. Don't crash on it, and
replace it instead.

QubesOS/qubes-issues#3438
  • Loading branch information
marmarek committed Oct 17, 2018
1 parent c01ae06 commit ba210c4
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions qubes/vm/qubesvm.py
Original file line number Diff line number Diff line change
Expand Up @@ -1439,6 +1439,8 @@ def create_on_disk(self, pool=None, pools=None):
'creation'.format(self.dir_path))
raise

if os.path.exists(self.icon_path):
os.unlink(self.icon_path)
self.log.info('Creating icon symlink: {} -> {}'.format(
self.icon_path, self.label.icon_path))
if hasattr(os, "symlink"):
Expand Down

0 comments on commit ba210c4

Please sign in to comment.