playlist: fix stored playlist modifications with absolute paths

When save_absolute_paths_in_playlists was enabled in mpd.conf, MPD
broke all playlists when manipulated using the "playlistdelete"
command.  The reason was that map_directory_child_fs() was used, which
doesn't accept slashes in the file name.  Use the new map_uri_fs()
function instead.
This commit is contained in:
Max Kellermann
2008-12-24 22:04:24 +01:00
parent a94e59ca21
commit 1bd3cde062
3 changed files with 20 additions and 2 deletions
+1 -1
View File
@@ -48,7 +48,7 @@ playlist_print_uri(FILE *file, const char *uri)
if (playlist_saveAbsolutePaths && !isRemoteUrl(uri) &&
uri[0] != '/')
s = map_directory_child_fs(db_get_root(), uri, tmp);
s = map_uri_fs(uri, tmp);
else
s = utf8_to_fs_charset(tmp, uri);