From ac0e371ca69685fcf1217464ab4481f4f1ec041a 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 path instead of converting it to a canonical path when loading a playlist. --- src/playlistparsers/parserbase.cpp | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/playlistparsers/parserbase.cpp b/src/playlistparsers/parserbase.cpp index c8a3942ef0..8d7ed02239 100644 --- a/src/playlistparsers/parserbase.cpp +++ b/src/playlistparsers/parserbase.cpp @@ -53,14 +53,9 @@ 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); - } - - // Use the canonical path - if (QFile::exists(filename)) { - filename = QFileInfo(filename).canonicalFilePath(); + filename = QDir::cleanPath(dir.absoluteFilePath(filename)); } const QUrl url = QUrl::fromLocalFile(filename);