OrganizeFormat: Use suffix instead of complete suffix

Fixes #1136
This commit is contained in:
Jonas Kvinge
2023-02-10 22:47:11 +01:00
parent d406a1c341
commit 7df4453560

View File

@@ -168,11 +168,11 @@ OrganizeFormat::GetFilenameForSongResult OrganizeFormat::GetFilenameForSong(cons
QFileInfo info(filepath);
filepath.clear();
if (extension.isEmpty()) {
if (info.completeSuffix().isEmpty()) {
extension = QFileInfo(song.url().toLocalFile()).completeSuffix();
if (info.suffix().isEmpty()) {
extension = QFileInfo(song.url().toLocalFile()).suffix();
}
else {
extension = info.completeSuffix();
extension = info.suffix();
}
}
if (!info.path().isEmpty() && info.path() != ".") {