Don't fill disk with thumbnails if thumbnail saving is turned off
ClosedPublic

Authored by sandsmark on Mar 28 2020, 2:03 PM.

Details

Summary

Even if "low resource usage mode" is turned on, which says it avoids storing thumbnails to disk to save space, it still stores thumbnails to disk. It just deletes _all_ thumbnails afterwards (even those not from gwenview itself).

This was also kind of racy, because thumbnailwriter could still be running, but the folders would be deleted, so it spammed a ton of error messages.

Test Plan

Doesn't store thumbnails when it shouldn't anymore, doesn't delete thumbnails from other applications nor the thumbnail folders, thumbnailwriter doesn't spaz out during exit, stores thumbnails when it should.

Diff Detail

Repository
R260 Gwenview
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.
sandsmark requested review of this revision.Mar 28 2020, 2:03 PM
sandsmark created this revision.

Yikes. Much safer. Please also remove the "Be careful:" warning text for this option on the config dialog's advanced page, as it no longer applies.

This revision was not accepted when it landed; it landed in state Needs Review.Apr 6 2020, 4:00 PM
This revision was automatically updated to reflect the committed changes.