diff options
author | Max Kellermann <max@duempel.org> | 2009-01-30 13:47:52 +0100 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2009-01-30 13:47:52 +0100 |
commit | 730364e4a3eca45a9fa71ed4d4d8f681edc8fd5d (patch) | |
tree | efec8f45baeee7949c3bd17c193c847871444815 | |
parent | 47bcb5f3c0d024bffa868f687485e6aaad2468b1 (diff) | |
download | mpd-730364e4a3eca45a9fa71ed4d4d8f681edc8fd5d.tar.gz mpd-730364e4a3eca45a9fa71ed4d4d8f681edc8fd5d.tar.xz mpd-730364e4a3eca45a9fa71ed4d4d8f681edc8fd5d.zip |
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.
Diffstat (limited to '')
-rw-r--r-- | src/mapper.c | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/mapper.c b/src/mapper.c index b7ddda209..5f7dca324 100644 --- a/src/mapper.c +++ b/src/mapper.c @@ -161,6 +161,9 @@ map_fs_to_utf8(const char *path_fs, char *buffer) /* not within musicDir */ return NULL; + while (path_fs[0] == G_DIR_SEPARATOR) + ++path_fs; + return fs_charset_to_utf8(buffer, path_fs); } |