Commit 3be63549 authored by Max Kellermann's avatar Max Kellermann

stored_playlist: add "file://" prefix to absolute paths

Prepare to fix loading arbitrary song files from stored playlists.
parent 9a107625
......@@ -272,7 +272,14 @@ spl_load(const char *utf8path, GError **error_r)
if (*s == 0 || *s == PLAYLIST_COMMENT)
continue;
if (!uri_has_scheme(s)) {
if (g_path_is_absolute(s)) {
char *t = fs_charset_to_utf8(s);
if (t == NULL)
continue;
s = g_strconcat("file://", t, NULL);
g_free(t);
} else if (!uri_has_scheme(s)) {
char *path_utf8;
path_utf8 = map_fs_to_utf8(s);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment