D12222: baloodb: Use complete access filtering for all outputs

Michael Heidelbach noreply at phabricator.kde.org
Tue Apr 17 19:43:17 UTC 2018


michaelh added a comment.


  I went I little overboard with `remove_if` and had to repair.
  Device filtering is also broken see inline comment.

INLINE COMMENTS

> databasesanitizer.cpp:160
>                  const QByteArray rootPath = QFile::encodeName(vol.rootPath());
>                  const auto fsinfo = filePathToStat(rootPath);
>                  const quint32 id = static_cast<quint32>(fsinfo.st_dev);

$ baloodb list --mounted-only Einstein
  Listing database contents...
  ! device: 43 inode: 319 url: /media/circulans/(tv-analog)/L-Z/Was Einstein noch nicht wusste.mkv
  + device: 46 inode: 319 url: /media/circulans/(doku)/Was Einstein noch nicht wusste.mkv

43 is the correct id for a share. The path is wrong.
46 is a wrong id for the same share. It should not be listed. The path however is correct.

`QStorageInfo` is not enough, I'm afraid. For proper matching mtab must be read.

REPOSITORY
  R293 Baloo

REVISION DETAIL
  https://phabricator.kde.org/D12222

To: michaelh, #baloo, #frameworks
Cc: bruns, ashaposhnikov, michaelh, astippich, spoorun
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20180417/4cdf5d93/attachment.html>


More information about the Kde-frameworks-devel mailing list