Check actual executable path instead of cExeName in GenerateDesktopFile

This commit is contained in:
Ilya Fedin 2023-07-01 10:25:47 +04:00 committed by John Preston
parent ac589cb51e
commit 0421e41c47
1 changed files with 2 additions and 2 deletions

View File

@ -182,7 +182,8 @@ bool GenerateDesktopFile(
const QStringList &args = {},
bool onlyMainGroup = false,
bool silent = false) {
if (targetPath.isEmpty() || cExeName().isEmpty()) {
const auto executable = ExecutablePathForShortcuts();
if (targetPath.isEmpty() || executable.isEmpty()) {
return false;
}
@ -191,7 +192,6 @@ bool GenerateDesktopFile(
const auto sourceFile = kDesktopFile.utf16();
const auto targetFile = targetPath + QGuiApplication::desktopFileName();
const auto executable = ExecutablePathForShortcuts();
const auto sourceText = [&] {
QFile source(sourceFile);