diff options
author | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-30 18:54:52 +0100 |
---|---|---|
committer | Sefa Eyeoglu <contact@scrumplex.net> | 2022-10-31 11:34:46 +0100 |
commit | 29d362a6e08f28ac48e737510a17ae7b3b717850 (patch) | |
tree | 3c13d4cfc5c3bc619daad3f7f32ef3d94c0bc84d /launcher/FileSystem.cpp | |
parent | b4be28b9bb29609212b398a5f46ee4dbc400cf2d (diff) | |
download | PrismLauncher-29d362a6e08f28ac48e737510a17ae7b3b717850.tar.gz PrismLauncher-29d362a6e08f28ac48e737510a17ae7b3b717850.tar.bz2 PrismLauncher-29d362a6e08f28ac48e737510a17ae7b3b717850.zip |
fix: do not trash instances in Flatpak
Signed-off-by: Sefa Eyeoglu <contact@scrumplex.net>
Diffstat (limited to 'launcher/FileSystem.cpp')
-rw-r--r-- | launcher/FileSystem.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp index 76cfccb0..aaa75e6f 100644 --- a/launcher/FileSystem.cpp +++ b/launcher/FileSystem.cpp @@ -44,6 +44,7 @@ #include <QStandardPaths> #include <QTextStream> #include <QUrl> +#include "DesktopServices.h" #if defined Q_OS_WIN32 #include <objbase.h> @@ -228,6 +229,9 @@ bool trash(QString path, QString *pathInTrash = nullptr) #if QT_VERSION < QT_VERSION_CHECK(5, 15, 0) return false; #else + // FIXME: Figure out trash in Flatpak. Qt seemingly doesn't use the Trash portal + if (DesktopServices::isFlatpak()) + return false; return QFile::moveToTrash(path, pathInTrash); #endif } |