PlaylistFile: always check for absolute paths within music_directory
Try map_fs_to_utf8() first, and fall back to Path::ToUTF8() for absolute paths.
This commit is contained in:
parent
0b27ac2f5c
commit
62271bf6ce
@ -243,16 +243,18 @@ LoadPlaylistFile(const char *utf8path, Error &error)
|
|||||||
|
|
||||||
std::string uri_utf8;
|
std::string uri_utf8;
|
||||||
|
|
||||||
if (g_path_is_absolute(s)) {
|
if (!uri_has_scheme(s)) {
|
||||||
uri_utf8 = Path::ToUTF8(s);
|
|
||||||
if (uri_utf8.empty())
|
|
||||||
continue;
|
|
||||||
|
|
||||||
uri_utf8.insert(0, "file://");
|
|
||||||
} else if (!uri_has_scheme(s)) {
|
|
||||||
uri_utf8 = map_fs_to_utf8(s);
|
uri_utf8 = map_fs_to_utf8(s);
|
||||||
if (uri_utf8.empty())
|
if (uri_utf8.empty()) {
|
||||||
continue;
|
if (g_path_is_absolute(s)) {
|
||||||
|
uri_utf8 = Path::ToUTF8(s);
|
||||||
|
if (uri_utf8.empty())
|
||||||
|
continue;
|
||||||
|
|
||||||
|
uri_utf8.insert(0, "file://");
|
||||||
|
} else
|
||||||
|
continue;
|
||||||
|
}
|
||||||
} else {
|
} else {
|
||||||
uri_utf8 = Path::ToUTF8(s);
|
uri_utf8 = Path::ToUTF8(s);
|
||||||
if (uri_utf8.empty())
|
if (uri_utf8.empty())
|
||||||
|
Loading…
Reference in New Issue
Block a user