D28745: Skip caching thumbnails on encrypted filesystems

David Faure noreply at phabricator.kde.org
Fri Aug 21 21:51:17 BST 2020


dfaure added inline comments.

INLINE COMMENTS

> marcingu wrote in thumbnail.cpp:776
> If st_dev cannot be 0 on successful call of lstat, I don't think there's need to change anything. m_thumbnailDirDeviceId will remain zero only if lstat returns error and as long it's zero sharesFilesystemWithThumbRoot will return false.

I agree with your second sentence. I never said otherwise. It will work, *if* indeed we are both right that st_dev would never be 0 when stat() succeeds.
My suggestion is that we make sure our assumption is correct -- at least, that we are told if it ever happens to be incorrect, by adding assert(baseStat.st_dev != 0) after the first lstat succeeds, and assert(fileStat.st_dev != 0) after the second lstat succeeds.

> marcingu wrote in thumbnail.h:93
> On Windows this check is assumed false. So in case encrypted file shares filesystem with thumbnails directory, it can take longer as those won't be cached, but it will work.

Which check? This is a member variable, and I'm not sure the dev_t type will be known at all on Windows.
But if you're not sure either, let's wait until CI tells us.

REPOSITORY
  R320 KIO Extras

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

To: marcingu, ivan, broulik, #dolphin, ngraham, meven, bruns, dfaure
Cc: dfaure, thiago, bruns, meven, ngraham, kde-frameworks-devel, kfm-devel, waitquietly, 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: <https://mail.kde.org/mailman/private/kfm-devel/attachments/20200821/11087d76/attachment.htm>


More information about the kfm-devel mailing list