Merge pull request #4479 from alanbriolat/playlist-path-separators

Always convert path separators when reading playlists (fixes #1838)
This commit is contained in:
John Maguire 2014-08-12 14:30:59 +02:00
commit 054749b690

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)) {