Diffusion KIO f539b17ceec2

KCoreDirLister: fix crash when creating new folders from kfilewidget

Authored by ahmadsamir on Sep 15 2019, 10:18 AM.

Description

KCoreDirLister: fix crash when creating new folders from kfilewidget

Summary:
When creating multiple nested new folders, one at a time, in the "save as"
dialog, where folders are created and entered, a dirlister would hit an
assert (in DirItem::reinsert()), because one of the created folders would
eventually get inserted in pendingUpdates.

Add a unit test in kfilewidgettest.

BUG: 401916
FIXED-IN: 5.63.0

Test Plan:

  • Open a file in e.g. okular, then "save as"
  • Create a new folder from the dialog, then another ... etc, usually 2-3 new folders would hit the assert (keep going, the number varies apparently) and the app would crash
  • Apply the patch then try again, it shouldn't crash

Reviewers: Frameworks, ahmadsamir

Subscribers: dhaumann, kde-frameworks-devel

Tags: Frameworks

Differential Revision: https://phabricator.kde.org/D23875

Details

Committed
dfaureSep 15 2019, 7:30 PM
Differential Revision
D23875: KCoreDirLister: fix crash when creating new folders from kfilewidget
Parents
R241:bcf51ae68193: Add apidox to most of KFilePlacesModel
Branches
Unknown
Tags
Unknown