From c38dd9e8d84eb7e398627bf6f2f562b2b0c35012 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Fri, 30 Jan 2009 13:47:52 +0100 Subject: 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. --- src/mapper.c | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/mapper.c b/src/mapper.c index 1eecbf283..b167479dd 100644 --- a/src/mapper.c +++ b/src/mapper.c @@ -205,6 +205,9 @@ map_fs_to_utf8(const char *path_fs) /* not within musicDir */ return NULL; + while (path_fs[0] == G_DIR_SEPARATOR) + ++path_fs; + return fs_charset_to_utf8(path_fs); } -- cgit v1.2.3