aboutsummaryrefslogtreecommitdiffstats
path: root/src/PlaylistMapper.cxx
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2013-01-17 00:56:57 +0100
committerMax Kellermann <max@duempel.org>2013-01-17 00:56:57 +0100
commit2cca3ed6ad118b58365ec2a87e71536f03055cf8 (patch)
treea511887a2b7a38a98969e04f6501dcbb711f1236 /src/PlaylistMapper.cxx
parent21fe376d1d9ffa6064cf89faab7860d443d9f7fd (diff)
downloadmpd-path.tar.gz
mpd-path.tar.xz
mpd-path.zip
Path: new class "Path" wraps filesystem path stringspath
Diffstat (limited to 'src/PlaylistMapper.cxx')
-rw-r--r--src/PlaylistMapper.cxx13
1 files changed, 4 insertions, 9 deletions
diff --git a/src/PlaylistMapper.cxx b/src/PlaylistMapper.cxx
index 01b8f7dd8..e6b8ee439 100644
--- a/src/PlaylistMapper.cxx
+++ b/src/PlaylistMapper.cxx
@@ -21,6 +21,7 @@
#include "PlaylistMapper.hxx"
#include "PlaylistFile.hxx"
#include "Mapper.hxx"
+#include "Path.hxx"
extern "C" {
#include "playlist_list.h"
@@ -75,19 +76,13 @@ static struct playlist_provider *
playlist_open_in_music_dir(const char *uri, GMutex *mutex, GCond *cond,
struct input_stream **is_r)
{
- char *path_fs;
-
assert(uri_safe_local(uri));
- path_fs = map_uri_fs(uri);
- if (path_fs == NULL)
+ Path path = map_uri_fs(uri);
+ if (path.IsNull())
return NULL;
- struct playlist_provider *playlist =
- playlist_open_path(path_fs, mutex, cond, is_r);
- g_free(path_fs);
-
- return playlist;
+ return playlist_open_path(path.c_str(), mutex, cond, is_r);
}
struct playlist_provider *