Don't create thumbnails for encrypted Vaults
ClosedPublic

Authored by ivan on Fri, Mar 22, 9:27 PM.

Details

Summary

This patch makes PreviewJob skip thumbnail generation on fuse.encfs and fuse.cryfs mounts.

BUG:404750

Diff Detail

Repository
R241 KIO
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
ivan created this revision.Fri, Mar 22, 9:27 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptFri, Mar 22, 9:27 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ivan requested review of this revision.Fri, Mar 22, 9:27 PM

There's a findByPath method on the list https://api.kde.org/frameworks/kio/html/classKMountPoint_1_1List.html#add38a82921d203856e1d1f9ddb9adbe6

It's a bit smarter as it resolves symlinks and such.

ivan updated this revision to Diff 54582.Fri, Mar 22, 9:57 PM

Incorporated David's advice

davidedmundson accepted this revision.Fri, Mar 22, 9:59 PM
This revision is now accepted and ready to land.Fri, Mar 22, 9:59 PM
ivan retitled this revision from Don't create thumbnails for encrypted drives (Vaults) to Don't create thumbnails for encrypted Vaults.Fri, Mar 22, 10:17 PM
ivan edited the summary of this revision. (Show Details)Fri, Mar 22, 10:19 PM
broulik added inline comments.
src/widgets/previewjob.cpp
307

Did you profile the impact of this call? I don't think it's cached. Can this maybe be moved to the thumbnail KIO so it's done out of process?

325

Use KFileItem::localPath()

ivan marked an inline comment as done.Sun, Mar 24, 1:28 PM
ivan added inline comments.
src/widgets/previewjob.cpp
307

I didn't do any profiling.

We can not cache because mount points can change. KMountPoint provides no signals of this.

It should not be overly expensive - small number of mounts to process.

ivan updated this revision to Diff 54673.Sun, Mar 24, 1:29 PM
davidedmundson accepted this revision.Sun, Mar 24, 1:32 PM
This revision was automatically updated to reflect the committed changes.