PlaylistParser: Resolve symbolic links when creating relative paths

Fixes #1071
This commit is contained in:
Jonas Kvinge 2022-12-04 00:18:55 +01:00
parent f9ec438b7f
commit 2a1260b79e
1 changed files with 2 additions and 2 deletions

View File

@ -209,10 +209,10 @@ void PlaylistParser::Save(const SongList &songs, const QString &filename, const
}
// Open the file
QFile file(filename);
QFile file(path_type == PlaylistSettingsPage::PathType_Absolute ? fileinfo.absoluteFilePath() : fileinfo.canonicalFilePath());
if (!file.open(QIODevice::WriteOnly)) return;
parser->Save(songs, &file, fileinfo.absolutePath(), path_type);
parser->Save(songs, &file, path_type == PlaylistSettingsPage::PathType_Absolute ? fileinfo.absolutePath() : fileinfo.canonicalPath(), path_type);
file.close();