D28745: Skip caching thumbnails on encrypted filesystems
Méven Car
noreply at phabricator.kde.org
Sun May 3 07:27:28 BST 2020
meven added inline comments.
INLINE COMMENTS
> thumbnail.cpp:738
> +#else
> + allowCache = false;
> +#endif
There is an error with the previous line, one of the two should be allowDirCached I think.
Here you always ignore result of `sharesFilesystemWithThumbRoot`
> thumbnail.cpp:776
> + struct stat baseStat;
> + if (!lstat(QFile::encodeName(m_thumbBasePath).data(), &baseStat)) {
> + m_thumbnailDirDeviceId = baseStat.st_dev;
`!= -1`, Add a warning with errno should it fail.
> thumbnail.cpp:781
> + struct stat fileStat;
> + return m_thumbnailDirDeviceId && !lstat(QFile::encodeName(path).data(), &fileStat) && m_thumbnailDirDeviceId == fileStat.st_dev;
> +}
error check here for `!lstat(QFile::encodeName(path).data(), &fileStat)` is important, file might have moved for instance.
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, aprcela, 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/20200503/685edd47/attachment-0001.html>
More information about the Kde-frameworks-devel
mailing list