playlist/PlaylistSong: Remove dots from playlist file paths.
This commit is contained in:
parent
49ed9dae34
commit
acc1bd6297
@ -24,6 +24,7 @@
|
|||||||
#include "fs/Traits.hxx"
|
#include "fs/Traits.hxx"
|
||||||
#include "song/DetachedSong.hxx"
|
#include "song/DetachedSong.hxx"
|
||||||
#include "util/UriExtract.hxx"
|
#include "util/UriExtract.hxx"
|
||||||
|
#include "util/UriUtil.hxx"
|
||||||
|
|
||||||
#include <algorithm>
|
#include <algorithm>
|
||||||
#include <string>
|
#include <string>
|
||||||
@ -96,8 +97,14 @@ playlist_check_translate_song(DetachedSong &song, std::string_view base_uri,
|
|||||||
#endif
|
#endif
|
||||||
|
|
||||||
if (base_uri.data() != nullptr &&
|
if (base_uri.data() != nullptr &&
|
||||||
!PathTraitsUTF8::IsAbsoluteOrHasScheme(uri))
|
!PathTraitsUTF8::IsAbsoluteOrHasScheme(uri)) {
|
||||||
song.SetURI(PathTraitsUTF8::Build(base_uri, uri));
|
song.SetURI(PathTraitsUTF8::Build(base_uri, uri));
|
||||||
|
uri = song.GetURI();
|
||||||
|
}
|
||||||
|
|
||||||
|
/* Remove dot segments */
|
||||||
|
std::string new_uri = uri_squash_dot_segments(uri);
|
||||||
|
song.SetURI(std::move(new_uri));
|
||||||
|
|
||||||
return playlist_check_load_song(song, loader);
|
return playlist_check_load_song(song, loader);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user