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:
parent
976e550aa7
commit
391ef64c22
@ -57,6 +57,7 @@
|
|||||||
#include <shlobj.h>
|
#include <shlobj.h>
|
||||||
#include <shobjidl.h>
|
#include <shobjidl.h>
|
||||||
#include <sys/utime.h>
|
#include <sys/utime.h>
|
||||||
|
#include <versionhelpers.h>
|
||||||
#include <windows.h>
|
#include <windows.h>
|
||||||
#include <winnls.h>
|
#include <winnls.h>
|
||||||
#include <string>
|
#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
|
// FIXME: Figure out trash in Flatpak. Qt seemingly doesn't use the Trash portal
|
||||||
if (DesktopServices::isFlatpak())
|
if (DesktopServices::isFlatpak())
|
||||||
return false;
|
return false;
|
||||||
|
#if defined Q_OS_WIN32
|
||||||
|
if (IsWindowsServer())
|
||||||
|
return false;
|
||||||
|
#endif
|
||||||
return QFile::moveToTrash(path, pathInTrash);
|
return QFile::moveToTrash(path, pathInTrash);
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user