elvisangelaccio created this revision. elvisangelaccio added a reviewer: dfaure. Restricted Application added a project: Frameworks. Restricted Application added a subscriber: Frameworks. elvisangelaccio requested review of this revision.
REVISION SUMMARY After a CopyJob the FileUndoManager records the file that was copied. If this file is deleted before the Undo operation is triggered, the File UndoManager will still try to undo the copy by deleting it. This patch fixes this issue by validating the recorded files with `QFileInfo::exists()`. If the FileUndoManager realizes that is no longer possible to undo the CopyJob, it will signal that undo operation is not available anymore. TEST PLAN From Dolphin: - Copy foo.txt to bar.txt - Shift+Del bar.txt - CTRL+Z REPOSITORY R241 KIO BRANCH undo-deleted-file (branched from master) REVISION DETAIL https://phabricator.kde.org/D10312 AFFECTED FILES autotests/fileundomanagertest.cpp autotests/fileundomanagertest.h src/widgets/fileundomanager.cpp To: elvisangelaccio, dfaure Cc: #frameworks, michaelh, ngraham