Diffusion KIO f56af9e2ea0a

Fix crash in Dolphin when dropping trashed file in trash

Authored by hallas on Feb 19 2019, 7:47 PM.

Description

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

Details

Committed
hallasFeb 25 2019, 10:07 AM
Reviewer
dfaure
Differential Revision
D19168: Fix crash in Dolphin when dropping trashed file in trash
Parents
R241:6470d55f3463: Use correct prefix for static variable
Branches
Unknown
Tags
Unknown