[KInotify] Fix path matching when removing watches
ClosedPublic

Authored by bruns on Apr 25 2020, 9:06 PM.

Details

Summary

As in removeWatch the path is passed in with a trailing slash, no path
is removed.

Always add a trailing slash, as otherwise startsWith() used for parent
checks may match erroneously (i.e. "/foo/bar2" startsWith "/foo/bar",
although it is no parent).

Depends on D29190

Test Plan

ctest -R filewatch

Diff Detail

Repository
R293 Baloo
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
bruns created this revision.Apr 25 2020, 9:06 PM
Restricted Application added projects: Frameworks, Baloo. · View Herald TranscriptApr 25 2020, 9:06 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
bruns requested review of this revision.Apr 25 2020, 9:06 PM
bruns edited the summary of this revision. (Show Details)Apr 26 2020, 12:52 PM
meven accepted this revision.Apr 26 2020, 1:20 PM
This revision is now accepted and ready to land.Apr 26 2020, 1:20 PM
This revision was automatically updated to reflect the committed changes.