diff options
author | Max Kellermann <max@duempel.org> | 2011-06-03 16:58:09 +0200 |
---|---|---|
committer | Max Kellermann <max@duempel.org> | 2011-06-03 16:58:09 +0200 |
commit | e228caaca62c8752d36ed8425b7f52809d34d348 (patch) | |
tree | 8e4b225f005e6c4d457f52b4d2fd97fac12a99b4 /src/playlist_song.c | |
parent | 9ac8f89b1d8a0c2b4a9ba391ce174fbb3fa816e9 (diff) | |
parent | 4b4aa64261154bcb1e521b98629c0640d6b259f7 (diff) | |
download | mpd-e228caaca62c8752d36ed8425b7f52809d34d348.tar.gz mpd-e228caaca62c8752d36ed8425b7f52809d34d348.tar.xz mpd-e228caaca62c8752d36ed8425b7f52809d34d348.zip |
Merge branch 'v0.16.x'
Conflicts:
src/decoder/ffmpeg_decoder_plugin.c
Diffstat (limited to 'src/playlist_song.c')
-rw-r--r-- | src/playlist_song.c | 9 |
1 files changed, 8 insertions, 1 deletions
diff --git a/src/playlist_song.c b/src/playlist_song.c index 38750ec63..8c966d549 100644 --- a/src/playlist_song.c +++ b/src/playlist_song.c @@ -106,6 +106,13 @@ playlist_check_translate_song(struct song *song, const char *base_uri, } } + if (base_uri != NULL && strcmp(base_uri, ".") == 0) + /* g_path_get_dirname() returns "." when there is no + directory name in the given path; clear that now, + because it would break the database lookup + functions */ + base_uri = NULL; + if (g_path_is_absolute(uri)) { /* XXX fs_charset vs utf8? */ char *prefix = base_uri != NULL @@ -131,7 +138,7 @@ playlist_check_translate_song(struct song *song, const char *base_uri, else uri = g_strdup(uri); - if (uri_has_scheme(base_uri)) { + if (uri_has_scheme(uri)) { dest = song_remote_new(uri); g_free(uri); } else { |