Diffusion Baloo 92850507a31d

Protect against invalid parents in the IdTreeDB

Authored by bruns on Apr 5 2019, 11:01 PM.

Description

Protect against invalid parents in the IdTreeDB

Summary:
DocumentUrlDB::put is susceptible to invalid parent ids caused by e.g.
renaming while a file/path is added. filePathToId will return 0 for a
(now) invalid dir, although 0 is reserved for the root folder.

As Writetransaction::removeRecursively calls itself for any child document,
having a 0 as child causes infinite recursion.

Test Plan: ctest

Reviewers: Baloo, Frameworks, ngraham, poboiko, astippich

Reviewed By: Baloo, ngraham

Subscribers: kde-frameworks-devel

Tags: Frameworks, Baloo

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

Details

Committed
brunsApr 5 2019, 11:01 PM
Reviewer
Baloo
Differential Revision
D20281: Protect against invalid parents in the IdTreeDB
Parents
R293:7842142c3288: Remove document from MTimeDB/DocumentTimeDB even when timestamp is 0
Branches
Unknown
Tags
Unknown