Fix writing of album art paths when saving XSPF files

This commit is contained in:
David Sansome 2010-12-11 09:31:39 +00:00
parent 5f6dcbe4b7
commit 292fdd3e7f
1 changed files with 1 additions and 3 deletions

View File

@ -130,9 +130,7 @@ void XSPFParser::Save(const SongList &songs, QIODevice *device, const QDir &dir)
// Ignore images that are in our resource bundle.
if (!art.startsWith(":") && !art.isEmpty()) {
// Convert local files to URLs.
if (!art.contains(QRegExp("^\\w+://"))) {
art = QUrl::fromLocalFile(MakeRelativeTo(art, dir)).toString();
}
art = MakeRelativeTo(art, dir);
writer.writeTextElement("image", art);
}
}