Merge pull request #731 from flowln/windows_server_trash
This commit is contained in:
parent
a8611a56fc
commit
4539d58d7d
@ -56,6 +56,7 @@
|
||||
#include <shlobj.h>
|
||||
#include <shobjidl.h>
|
||||
#include <sys/utime.h>
|
||||
#include <versionhelpers.h>
|
||||
#include <windows.h>
|
||||
#include <winnls.h>
|
||||
#include <string>
|
||||
@ -234,6 +235,10 @@ bool trash(QString path, QString *pathInTrash = nullptr)
|
||||
// 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
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user