1
0
mirror of https://github.com/clementine-player/Clementine synced 2025-01-31 03:27:40 +01:00

Always convert path separators when reading playlists (fixes #1838)

This commit is contained in:
Alan Briolat 2014-08-12 13:01:59 +01:00
parent 20923c7303
commit c02ea88bfe

View File

@ -46,8 +46,10 @@ void ParserBase::LoadSong(const QString& filename_or_url, qint64 beginning,
}
}
// Convert native separators for Windows paths
filename = QDir::fromNativeSeparators(filename);
// Clementine always wants / separators internally. Using
// QDir::fromNativeSeparators() only works on the same platform the playlist
// was created on/for, using replace() lets playlists work on any platform.
filename = filename.replace('\\', '/')
// Make the path absolute
if (!QDir::isAbsolutePath(filename)) {