D28745: Skip caching thumbnails on encrypted filesystems
Stefan BrĂ¼ns
noreply at phabricator.kde.org
Sat Apr 18 14:29:50 BST 2020
bruns requested changes to this revision.
bruns added inline comments.
This revision now requires changes to proceed.
INLINE COMMENTS
> thumbnail.cpp:731
> + struct stat baseStat, fileStat;
> + if (!lstat(m_thumbBasePath.toStdString().c_str(), &baseStat) && lstat(filePath.toStdString().c_str(), &fileStat)) {
> + allowCache = baseStat.st_dev == fileStat.st_dev;
Please do the stat for m_thumbBasePath just once.
Also, toStdString is wrong, use the string encoding functions from `QFIle`.
> thumbnail.cpp:737
> + // If file is on encrypted filesystem different than thumbnail directory, we can't cache it
> + const auto mountsList = KMountPoint::currentMountPoints();
> + const auto mount = mountsList.findByPath(filePath);
This will have some impact when creating thumbnails for any external or secondary storage (i.e. everything not in the HOME partition).
REPOSITORY
R320 KIO Extras
REVISION DETAIL
https://phabricator.kde.org/D28745
To: marcingu, ivan, broulik, #dolphin, ngraham, meven, bruns
Cc: bruns, meven, ngraham, kde-frameworks-devel, kfm-devel, azyx, nikolaik, pberestov, iasensio, fprice, LeGast00n, cblack, fbampaloukas, alexde, Codezela, feverfew, michaelh, spoorun, navarromorales, firef, andrebarros, emmanuelp, rdieter, mikesomov
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.kde.org/pipermail/kde-frameworks-devel/attachments/20200418/3a0cab34/attachment.html>
More information about the Kde-frameworks-devel
mailing list