From e2c85e235935c2479fec0c57726bbaca09c6ed0b Mon Sep 17 00:00:00 2001 From: liyigang Date: Mon, 17 Jun 2024 16:13:40 +0800 Subject: [PATCH] fix: Dragging files from the trash to a USB drive for undo can cause dde-file-manager to freeze Error in passing parameters during complete deletion Log: Dragging files from the trash to a USB drive for undo can cause dde-file-manager to freeze Bug: https://pms.uniontech.com/bug-view-259887.html --- .../fileoperationsevent/trashfileeventreceiver.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp b/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp index a9ef286568..9882fcfee8 100644 --- a/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp +++ b/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp @@ -84,7 +84,9 @@ JobHandlePointer TrashFileEventReceiver::doMoveToTrash(const quint64 windowId, c if (nullDirDelete || !FileUtils::fileCanTrash(sourceFirst) || !dfmio::DFMUtils::supportTrash(sourceFirst)) { if (DialogManagerInstance->showDeleteFilesDialog(sources, true) != QDialog::Accepted) return nullptr; - handle = copyMoveJob->deletes(sources, flags); + handle = copyMoveJob->deletes(sources, flags, isInit); + if (!isInit) + return handle; } else { // check url permission QList urlsCanTrash = sources;