[CopyJob] Use resolved URL in copyingDone so undo can rename back using local file
ClosedPublic

Authored by dfaure on Sep 6 2019, 4:16 PM.

Details

Summary

In case of desktop:/ KIO which rewrites URLs, looking up the URL the trashed file got didn't work.
This resulted in trash:/filename being recorded by the undo manager which then
failed to restore the file as it was actually trashed to e.g. trash:/0-filename.

In addition, the source URL must be resolved too, since kio_trash
doesn't support renaming from trash to desktop URLs.

BUG: 391606
FIXED-IN: 5.62

CHANGELOG: Undoing trashing files on the desktop has been fixed

Thanks: to Kai-Uwe for the debugging and the initial patch; to Nate for pinging me a few times for this to happen ;)

Test Plan

Extended kio_desktop's unittest: http://www.davidfaure.fr/2019/test_trash_and_undo.diff
Did not test as user.

Diff Detail

Repository
R241 KIO
Branch
master
Lint
No Linters Available
Unit
No Unit Test Coverage
Build Status
Buildable 16187
Build 16205: arc lint + arc unit
dfaure created this revision.Sep 6 2019, 4:16 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptSep 6 2019, 4:16 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
dfaure requested review of this revision.Sep 6 2019, 4:16 PM
ngraham accepted this revision.Sep 6 2019, 7:47 PM

Works and makes sense, thanks!

This revision is now accepted and ready to land.Sep 6 2019, 7:47 PM
dfaure closed this revision.Sep 7 2019, 1:54 PM