Fix crash in Dolphin when dropping trashed file in trash
Summary:
Fix crash in Dolphin when dropping trashed file in trash. The actual
crash happens because of an assertion failure in kcoredirlister_p.h:308
and this is triggered from kcoredirlister.cpp:995. What actually happens
is that the dropjob determines that it should perform a move action
which ends up being a rename operation for kio_trash. But it ends up
moving the file to itself and this triggers the above crash. The
solution is to error out in the dropjob with a KIO::ERR_DROP_ON_ITSELF
error so that the user can see that it doesn't make sense to drop a
file from the trash inside the trash again.
BUG: 378051
Test Plan:
Put a file in trash
Drag and drop the file to the trash
Reviewers: Frameworks, elvisangelaccio, ngraham, dfaure
Reviewed By: dfaure
Subscribers: kde-frameworks-devel
Tags: Frameworks
Differential Revision: https://phabricator.kde.org/D19168