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

Reply via email to