Skip to content

Commit e98325c

Browse files
committed
Clean up (potentially stale) icon symlinks to avoid icon issues
1 parent eb14733 commit e98325c

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

safeeyes/utility.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -564,7 +564,11 @@ def initialize_platform():
564564
parent_dir = str(Path(local_icon).parent)
565565

566566
if os.path.exists(global_icon):
567-
# This icon is already added to the /usr/share/icons/hicolor folder
567+
# This icon is already added to the /usr/share/icons/hicolor folder.
568+
# No need to create a link but we delete potentially stale symlinks
569+
# from e.g. past runs from a virtualenv that has been removed in the
570+
# meantime to avoid ending up with hard-to-debug SafeEyes without icons.
571+
delete(local_icon)
568572
continue
569573

570574
# Create the directory if not exists

0 commit comments

Comments
 (0)