# HG changeset patch # User Matti Hamalainen # Date 1213178938 -10800 # Node ID a7392e85d4c6bb648e8c25b7be6bf1dcd4a88491 # Parent a615322374c85c781af800507fade4ff916a8005 Cosmetics. diff -r a615322374c8 -r a7392e85d4c6 src/audacious/util.c --- a/src/audacious/util.c Fri Jun 06 15:37:29 2008 +0300 +++ b/src/audacious/util.c Wed Jun 11 13:08:58 2008 +0300 @@ -995,18 +995,16 @@ // case 1: filename is raw full path or uri if (filename[0] == '/' || strstr(filename, "://")) { uri = g_filename_to_uri(filename, NULL, NULL); - if(!uri) { + if(!uri) uri = g_strdup(filename); - } g_free(filename); } // case 2: filename is not raw full path nor uri, playlist path is full path // make full path by replacing last part of playlist path with filename. (using g_build_filename) else if (playlist_name[0] == '/' || strstr(playlist_name, "://")) { path = g_filename_from_uri(playlist_name, NULL, NULL); - if (!path) { + if (!path) path = g_strdup(playlist_name); - } tmp = strrchr(path, '/'); *tmp = '\0'; tmp = g_build_filename(path, filename, NULL); g_free(path); g_free(filename); @@ -1017,7 +1015,7 @@ // just abort. else { g_free(filename); - return NULL; + uri = NULL; } AUDDBG("uri=%s\n", uri);