From 391ef64c22f1e106983abe51027096f3bf772c15 Mon Sep 17 00:00:00 2001 From: flow Date: Tue, 10 Jan 2023 12:50:56 -0300 Subject: [PATCH] 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 --- launcher/FileSystem.cpp | 5 +++++ 1 file changed, 5 insertions(+) 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 #include #include +#include #include #include #include @@ -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 }