Skip to content

Commit

Permalink
Resolve ~ and $HOME in icon_path
Browse files Browse the repository at this point in the history
`icon_path` was used verbatim which doesn't resolve e.g. `~` or `$HOME`.
As `string_to_path` already exists, we can use it for the resolution
here as well.
  • Loading branch information
zappolowski committed Oct 5, 2024
1 parent c1cc6d1 commit 4c977cc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/icon.c
Original file line number Diff line number Diff line change
Expand Up @@ -242,7 +242,7 @@ char *get_path_from_icon_name(const char *iconname, int size)
end = strchr(start, ':');
if (!end) end = strchr(settings.icon_path, '\0'); /* end = end of string */

current_folder = g_strndup(start, end - start);
current_folder = string_to_path(g_strndup(start, end - start));

for (const char **suf = suffixes; *suf; suf++) {
gchar *name_with_extension = g_strconcat(iconname, *suf, NULL);
Expand Down

0 comments on commit 4c977cc

Please sign in to comment.