From 1631d5be89e682f7a81a28a4d0afbe30434a9bcb Mon Sep 17 00:00:00 2001 From: "James D. Smith" Date: Tue, 12 Oct 2021 20:46:45 -0600 Subject: [PATCH] Playlist Parser: Clean the file path when loading a playlist. --- src/playlistparsers/parserbase.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/playlistparsers/parserbase.cpp b/src/playlistparsers/parserbase.cpp index 96cc062761..190d289ec7 100644 --- a/src/playlistparsers/parserbase.cpp +++ b/src/playlistparsers/parserbase.cpp @@ -53,11 +53,13 @@ void ParserBase::LoadSong(const QString& filename_or_url, qint64 beginning, // was created on/for, using replace() lets playlists work on any platform. filename = filename.replace('\\', '/'); - // Make the path absolute + // Make the path absolute and clean it if (!QDir::isAbsolutePath(filename)) { filename = dir.absoluteFilePath(filename); } + filename = QDir::cleanPath(filename); + const QUrl url = QUrl::fromLocalFile(filename); // Search in the library