Commit b21ed2fa authored by Max Kellermann's avatar Max Kellermann

PlaylistMapper: convert playlist name to filesystem charset

parent 0214baad
...@@ -53,13 +53,14 @@ playlist_open_in_playlist_dir(const char *uri, Mutex &mutex, Cond &cond, ...@@ -53,13 +53,14 @@ playlist_open_in_playlist_dir(const char *uri, Mutex &mutex, Cond &cond,
if (playlist_directory_fs.IsNull()) if (playlist_directory_fs.IsNull())
return nullptr; return nullptr;
char *path_fs = g_build_filename(playlist_directory_fs.c_str(), uri, const Path uri_fs = Path::FromUTF8(uri);
nullptr); if (uri_fs.IsNull())
return nullptr;
auto playlist = playlist_open_path(path_fs, mutex, cond, is_r); const Path path_fs = Path::Build(playlist_directory_fs, uri_fs);
g_free(path_fs); assert(!path_fs.IsNull());
return playlist; return playlist_open_path(path_fs.c_str(), mutex, cond, is_r);
} }
/** /**
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment