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.
This commit is contained in:
Max Kellermann 2008-10-19 00:05:39 +02:00
parent 7487f9810c
commit 57f5e8731d
1 changed files with 1 additions and 1 deletions

View File

@ -110,7 +110,7 @@ map_fs_to_utf8(const char *path_fs, char *buffer)
if (strncmp(path_fs, music_dir, music_dir_length) == 0 && if (strncmp(path_fs, music_dir, music_dir_length) == 0 &&
path_fs[music_dir_length] == '/') path_fs[music_dir_length] == '/')
/* remove musicDir prefix */ /* remove musicDir prefix */
path_fs += music_dir_length; path_fs += music_dir_length + 1;
else if (path_fs[0] == '/') else if (path_fs[0] == '/')
/* not within musicDir */ /* not within musicDir */
return NULL; return NULL;