Skip to content

Commit ab5525d

Browse files
Merge pull request slgobinath#819 from hartwork/issue-815-delete-stale-symlinks
Clean up (potentially stale) icon symlinks to avoid icon issues (fixes slgobinath#815)
2 parents 473f16d + e98325c commit ab5525d

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)