Don't create thumbnails for encrypted Vaults
ClosedPublic

Authored by ivan on Mar 22 2019, 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
Lint Skipped
Unit
Unit Tests Skipped
ivan created this revision.Mar 22 2019, 9:27 PM
Restricted Application added a project: Frameworks. · View Herald TranscriptMar 22 2019, 9:27 PM
Restricted Application added a subscriber: kde-frameworks-devel. · View Herald Transcript
ivan requested review of this revision.Mar 22 2019, 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.Mar 22 2019, 9:57 PM

Incorporated David's advice

davidedmundson accepted this revision.Mar 22 2019, 9:59 PM
This revision is now accepted and ready to land.Mar 22 2019, 9:59 PM
ivan retitled this revision from Don't create thumbnails for encrypted drives (Vaults) to Don't create thumbnails for encrypted Vaults.Mar 22 2019, 10:17 PM
ivan edited the summary of this revision. (Show Details)Mar 22 2019, 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.Mar 24 2019, 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.Mar 24 2019, 1:29 PM
davidedmundson accepted this revision.Mar 24 2019, 1:32 PM
This revision was automatically updated to reflect the committed changes.