File tree Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Expand file tree Collapse file tree 1 file changed +3
-4
lines changed Original file line number Diff line number Diff line change @@ -214,15 +214,15 @@ char *get_path_from_icon_name(const char *iconname, int size)
214214 if (STR_EMPTY (iconname ))
215215 return NULL ;
216216
217- char * uri_path = NULL ;
218217 if (g_str_has_prefix (iconname , "file://" )) {
219218 char * uri_path = g_filename_from_uri (iconname , NULL , NULL );
220219 if (STR_EMPTY (uri_path )) {
221220 LOG_W ("Invalid file uri '%s'" , iconname );
222221 return NULL ;
223222 }
224- iconname = uri_path ;
225- } else if (iconname [0 ] == '/' || iconname [0 ] == '~' ) {
223+ return uri_path ;
224+ } else if (iconname [0 ] == '/' ) {
225+ // NOTE: Paths starting with ~ should have already been handled
226226 // Return absolute path
227227 return g_strdup (iconname );
228228 } else if (settings .enable_recursive_icon_lookup ) {
@@ -266,7 +266,6 @@ char *get_path_from_icon_name(const char *iconname, int size)
266266 else
267267 LOG_I ("Found icon '%s' at %s" , iconname , path );
268268
269- g_free (uri_path );
270269 return path ;
271270}
272271
You can’t perform that action at this time.
0 commit comments