Skip to content

Commit

Permalink
Playlist Parser: Clean the file path when loading a playlist.
Browse files Browse the repository at this point in the history
  • Loading branch information
smithjd15 committed Mar 16, 2022
1 parent 5827d7d commit 1631d5b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/playlistparsers/parserbase.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1631d5b

Please sign in to comment.