PlaylistMapper: convert playlist name to filesystem charset

This commit is contained in:
Max Kellermann 2013-10-02 08:37:37 +02:00
parent 0214baad5a
commit b21ed2fa36
1 changed files with 6 additions and 5 deletions

View File

@ -53,13 +53,14 @@ playlist_open_in_playlist_dir(const char *uri, Mutex &mutex, Cond &cond,
if (playlist_directory_fs.IsNull())
return nullptr;
char *path_fs = g_build_filename(playlist_directory_fs.c_str(), uri,
nullptr);
const Path uri_fs = Path::FromUTF8(uri);
if (uri_fs.IsNull())
return nullptr;
auto playlist = playlist_open_path(path_fs, mutex, cond, is_r);
g_free(path_fs);
const Path path_fs = Path::Build(playlist_directory_fs, uri_fs);
assert(!path_fs.IsNull());
return playlist;
return playlist_open_path(path_fs.c_str(), mutex, cond, is_r);
}
/**