aboutsummaryrefslogtreecommitdiff
path: root/launcher/FileSystem.cpp
diff options
context:
space:
mode:
authorflow <flowlnlnln@gmail.com>2023-01-10 12:50:56 -0300
committerflow <flowlnlnln@gmail.com>2023-01-10 12:50:56 -0300
commit391ef64c22f1e106983abe51027096f3bf772c15 (patch)
tree22863c3a2d920de4a28f2eb55ca3df5094d31626 /launcher/FileSystem.cpp
parent976e550aa7291f22f5011178ab824a937f89d11a (diff)
downloadPrismLauncher-391ef64c22f1e106983abe51027096f3bf772c15.tar.gz
PrismLauncher-391ef64c22f1e106983abe51027096f3bf772c15.tar.bz2
PrismLauncher-391ef64c22f1e106983abe51027096f3bf772c15.zip
fix(FileSystem): don't attempt to trash items on Windows Server
For some reason this makes some of our CI test runs super slow, and sometimes fail miserably. Signed-off-by: flow <flowlnlnln@gmail.com>
Diffstat (limited to 'launcher/FileSystem.cpp')
-rw-r--r--launcher/FileSystem.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/launcher/FileSystem.cpp b/launcher/FileSystem.cpp
index 7a135811..aee5245d 100644
--- a/launcher/FileSystem.cpp
+++ b/launcher/FileSystem.cpp
@@ -57,6 +57,7 @@
#include <shlobj.h>
#include <shobjidl.h>
#include <sys/utime.h>
+#include <versionhelpers.h>
#include <windows.h>
#include <winnls.h>
#include <string>
@@ -251,6 +252,10 @@ bool trash(QString path, QString *pathInTrash)
// FIXME: Figure out trash in Flatpak. Qt seemingly doesn't use the Trash portal
if (DesktopServices::isFlatpak())
return false;
+#if defined Q_OS_WIN32
+ if (IsWindowsServer())
+ return false;
+#endif
return QFile::moveToTrash(path, pathInTrash);
#endif
}