aboutsummaryrefslogtreecommitdiffstats
path: root/src/playlist_song.c
diff options
context:
space:
mode:
authorMax Kellermann <max@duempel.org>2012-02-13 20:10:19 +0100
committerMax Kellermann <max@duempel.org>2012-02-13 20:10:19 +0100
commit0a0b473765fe5ba43f442e3d12853add3ff51415 (patch)
treee6abfddf8066f1c9cf7ab0836505303ad0457ce0 /src/playlist_song.c
parentdf2d0414837ec0b53836f9c32e0f93d3baaefb14 (diff)
downloadmpd-0a0b473765fe5ba43f442e3d12853add3ff51415.tar.gz
mpd-0a0b473765fe5ba43f442e3d12853add3ff51415.tar.xz
mpd-0a0b473765fe5ba43f442e3d12853add3ff51415.zip
mapper: add mapper_get_music_directory()
Shortcut for map_directory_fs(db_get_root()).
Diffstat (limited to 'src/playlist_song.c')
-rw-r--r--src/playlist_song.c4
1 files changed, 1 insertions, 3 deletions
diff --git a/src/playlist_song.c b/src/playlist_song.c
index d40ef63cf..8a3ba303e 100644
--- a/src/playlist_song.c
+++ b/src/playlist_song.c
@@ -115,7 +115,7 @@ playlist_check_translate_song(struct song *song, const char *base_uri,
if (g_path_is_absolute(uri)) {
/* XXX fs_charset vs utf8? */
- char *prefix = map_directory_fs(db_get_root());
+ const char *prefix = mapper_get_music_directory();
if (prefix != NULL && g_str_has_prefix(uri, prefix) &&
uri[strlen(prefix)] == '/')
@@ -123,13 +123,11 @@ playlist_check_translate_song(struct song *song, const char *base_uri,
else if (!secure) {
/* local files must be relative to the music
directory when "secure" is enabled */
- g_free(prefix);
song_free(song);
return NULL;
}
base_uri = NULL;
- g_free(prefix);
}
if (base_uri != NULL)