fix: error in changeFileExt

This commit is contained in:
Roy Qu 2024-04-25 21:47:19 +08:00
parent 60c3bcc1c2
commit 87e39c6564
1 changed files with 2 additions and 2 deletions

View File

@ -539,9 +539,9 @@ QString changeFileExt(const QString& filename, QString ext)
path = includeTrailingPathDelimiter(fileInfo.path()); path = includeTrailingPathDelimiter(fileInfo.path());
} }
if (suffix.isEmpty()) { if (suffix.isEmpty()) {
return QFileInfo{path+name+ext}.absoluteFilePath(); return path+name+ext;
} else { } else {
return QFileInfo{path+fileInfo.completeBaseName()+ext}.absoluteFilePath(); return path+fileInfo.completeBaseName()+ext;
} }
} }