Commit c38dd9e8 authored by Max Kellermann's avatar Max Kellermann

mapper: ignore duplicate slashes in playlists

When there are duplicate slashes in the song paths, eliminate them; example: /var/lib/mpd/music//foo.mp3 becomes: /var/lib/mpd/music/foo.mp3 The slash is only detected at the border between the music_directory and the local part.
parent e3d4fa69
...@@ -205,6 +205,9 @@ map_fs_to_utf8(const char *path_fs) ...@@ -205,6 +205,9 @@ map_fs_to_utf8(const char *path_fs)
/* not within musicDir */ /* not within musicDir */
return NULL; return NULL;
while (path_fs[0] == G_DIR_SEPARATOR)
++path_fs;
return fs_charset_to_utf8(path_fs); return fs_charset_to_utf8(path_fs);
} }
......
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