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>
This commit is contained in:
		| @@ -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 | ||||
| } | ||||
|   | ||||
		Reference in New Issue
	
	Block a user