Expand leading tilde in icon paths (fixes #743)

This commit is contained in:
Chris Lee
2019-06-02 22:08:20 +02:00
parent b9c313cd18
commit 784edaccd2
4 changed files with 8 additions and 3 deletions

View File

@@ -566,6 +566,10 @@ char *icon_path_from_full_path(const char *s)
{
if (is_full_path(s) && file_exists(s))
return strdup(s);
char *expanded = expand_tilde(s);
if (is_full_path(expanded) && file_exists(expanded))
return expanded;
free(expanded);
return NULL;
}