playlist_song: fix playlist files in base music directory
g_path_get_dirname() returns "." when there is no directory name in the given path. This patch adds a workaround for that.
This commit is contained in:
parent
9402b23dd5
commit
26735390ff
1
NEWS
1
NEWS
|
@ -1,6 +1,7 @@
|
||||||
ver 0.16.3 (2011/??/??)
|
ver 0.16.3 (2011/??/??)
|
||||||
* fix assertion failure in audio format mask parser
|
* fix assertion failure in audio format mask parser
|
||||||
* fix NULL pointer dereference in playlist parser
|
* fix NULL pointer dereference in playlist parser
|
||||||
|
* fix playlist files in base music directory
|
||||||
* decoder:
|
* decoder:
|
||||||
- ffmpeg: support libavcodec 0.7
|
- ffmpeg: support libavcodec 0.7
|
||||||
|
|
||||||
|
|
|
@ -105,6 +105,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)) {
|
if (g_path_is_absolute(uri)) {
|
||||||
/* XXX fs_charset vs utf8? */
|
/* XXX fs_charset vs utf8? */
|
||||||
char *prefix = base_uri != NULL
|
char *prefix = base_uri != NULL
|
||||||
|
|
Loading…
Reference in New Issue