Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions snapcraft/parts/desktop_file.py
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,11 @@ def _parse_and_reformat_section(
# If icon is just a name (no path separator), try to resolve it from the hicolor icon theme.
if "/" not in icon:
if (
icon_path := get_icon_from_theme(
theme_icon_path := get_icon_from_theme(
os.fspath(self._prime_dir), "hicolor", icon
)
Comment on lines 99 to 103
) is not None:
self._parser[section]["Icon"] = os.path.join("${SNAP}", icon_path)
icon = theme_icon_path
Comment on lines +101 to +105

# With everything stripped, check to see if the icon is there.
# if it is, add "${SNAP}" back and set the icon
Expand Down
Loading