UI: AppInfoUtil::getInfo: Fix regression

This commit is contained in:
Nodir Temirkhodjaev 2023-01-11 15:33:04 +03:00
parent dd05277c71
commit a068b97e6e

View File

@ -151,12 +151,6 @@ bool extractVersionInfo(const QString &appPath, AppInfo &appInfo)
appInfo.productName = extractInfoText(infoData, langInfo, L"ProductName");
appInfo.fileDescription = extractInfoText(infoData, langInfo, L"FileDescription");
// File description
if (appInfo.fileDescription.isEmpty()) {
appInfo.fileDescription =
!appInfo.productName.isEmpty() ? appInfo.productName : FileUtil::fileName(appPath);
}
return true;
}
@ -192,6 +186,12 @@ bool getInfo(const QString &appPath, AppInfo &appInfo)
revertWow64FsRedirection(wow64FsRedir);
// File description
if (appInfo.fileDescription.isEmpty()) {
appInfo.fileDescription =
!appInfo.productName.isEmpty() ? appInfo.productName : FileUtil::fileName(appPath);
}
return ok;
}