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

Reply via email to