From 8eb76d1f3539db043cb3ea8af4f7573214daee16 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 c6234aebde..d717d091e6 100644 --- a/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp +++ b/src/plugins/common/core/dfmplugin-fileoperations/fileoperationsevent/trashfileeventreceiver.cpp @@ -91,7 +91,9 @@ JobHandlePointer TrashFileEventReceiver::doMoveToTrash(const quint64 windowId, c (!dfmio::DFMUtils::supportTrash(sourceFirst) && !canTrash)) { 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;