aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2008-10-19 00:05:39 +0200
committerMax Kellermann <max@duempel.org>2008-10-19 00:05:39 +0200
commit57f5e8731df8bec45fa1034020283b4e1541f72e (patch)
tree4b368ac272df0cc797a211383af66bcb0eb8ec0a
parent7487f9810c8b84c613c72db622457b163f67f890 (diff)
downloadmpd-57f5e8731df8bec45fa1034020283b4e1541f72e.tar.gz
mpd-57f5e8731df8bec45fa1034020283b4e1541f72e.tar.xz
mpd-57f5e8731df8bec45fa1034020283b4e1541f72e.zip
mapper: don't return database path with leading slash
Due to an off-by-one bug in map_fs_to_utf8(), the function returned database paths with a leading slash.
Diffstat (limited to '')
-rw-r--r--src/mapper.c2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/mapper.c b/src/mapper.c
index 1b704e55e..66d3bcc9f 100644
--- a/src/mapper.c
+++ b/src/mapper.c
@@ -110,7 +110,7 @@ map_fs_to_utf8(const char *path_fs, char *buffer)
if (strncmp(path_fs, music_dir, music_dir_length) == 0 &&
path_fs[music_dir_length] == '/')
/* remove musicDir prefix */
- path_fs += music_dir_length;
+ path_fs += music_dir_length + 1;
else if (path_fs[0] == '/')
/* not within musicDir */
return NULL;