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-18 15:34:01 +0100
commite5039c478aa93e3e107ee9031a3cf27a6c203fea (patch)
tree5d9fecc644b915fe02634911d65c29123e03c1b8 /src/PlaylistMapper.cxx
parent890151450663abd581cab56e853e8e713d822851 (diff)
downloadmpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.gz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.tar.xz
mpd-e5039c478aa93e3e107ee9031a3cf27a6c203fea.zip
Path: new class "Path" wraps filesystem path strings
Diffstat (limited to '')
-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 *