From 16e325d053629b082f6ccf2c4c189c925346b1d8 Mon Sep 17 00:00:00 2001 From: xSlendiX Date: Sun, 4 Jun 2023 20:24:34 +0300 Subject: [PATCH] Fix desktop shortcut not working on flatpak. This patch adds the ability to make working shortcuts on flatpak. However, this requires permissions to write files to the /home/Desktop directory. This means the flathub/org.polymc.PolyMC repository needs to be updated. Signed-off-by: xSlendiX --- launcher/ui/MainWindow.cpp | 3 +++ 1 file changed, 3 insertions(+) diff --git a/launcher/ui/MainWindow.cpp b/launcher/ui/MainWindow.cpp index da6de1337..46ecef98a 100644 --- a/launcher/ui/MainWindow.cpp +++ b/launcher/ui/MainWindow.cpp @@ -1910,6 +1910,9 @@ void MainWindow::on_actionCreateShortcut_triggered() auto desktop = QStandardPaths::writableLocation(QStandardPaths::DesktopLocation); auto executable_path = APPLICATION->applicationFilePath(); + if (APPLICATION->isFlatpak()) { + executable_path = "flatpak run org.polymc.PolyMC "; + } auto instId = m_selectedInstance->id(); auto icon = APPLICATION->windowIcon(); auto name = m_selectedInstance->name();