Skip to content

Commit

Permalink
Check actual executable path instead of cExeName in GenerateDesktopFile
Browse files Browse the repository at this point in the history
  • Loading branch information
ilya-fedin authored and john-preston committed Jul 1, 2023
1 parent ac589cb commit 0421e41
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions Telegram/SourceFiles/platform/linux/specific_linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}

Expand All @@ -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);
Expand Down

0 comments on commit 0421e41

Please sign in to comment.