Merge pull request #4479 from alanbriolat/playlist-path-separators
Always convert path separators when reading playlists (fixes #1838)
This commit is contained in:
commit
054749b690
@ -46,8 +46,10 @@ void ParserBase::LoadSong(const QString& filename_or_url, qint64 beginning,
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Convert native separators for Windows paths
|
// Clementine always wants / separators internally. Using
|
||||||
filename = QDir::fromNativeSeparators(filename);
|
// 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
|
// Make the path absolute
|
||||||
if (!QDir::isAbsolutePath(filename)) {
|
if (!QDir::isAbsolutePath(filename)) {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user