D11753: baloodb: Add clean command
Michael Heidelbach
noreply at phabricator.kde.org
Tue Apr 3 10:13:59 UTC 2018
michaelh planned changes to this revision.
michaelh added inline comments.
INLINE COMMENTS
> bruns wrote in databasesanitizer.cpp:316
> What do you consider a "truly dead" symlink?
>
> If you really want to do it correctly, you have to walk the file system yourself, one symlink target path component at a time - each path component can be a symlink itself, or a mount point. You should check the device id for *every* path component.
Damn, you're right! I was fooled by this:
$ balooctl index /mnt/otto/test.mp4
$ ln -s /mnt/otto/test.mp4 ~/Videos/
baloo now also indexes `~/Videos/test.mp4`
Only in this case `m_pimpl->m_transaction->documentId(info.symlink.toLocal8Bit());` will return an `id != 0`
I did not notice because every indexed symbolic link on my system also has its target indexed. I never saw `id == 0`
REPOSITORY
R293 Baloo
REVISION DETAIL
https://phabricator.kde.org/D11753
To: michaelh, #baloo, #frameworks
Cc: bruns, cfeck, smithjd, ashaposhnikov, michaelh, astippich, spoorun, ngraham, alexeymin
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180403/7c81118d/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list