Bug 446736

Summary: Invalid thumbnail if the resource is updated externally on storage
Product: [Applications] krita Reporter: sh_zam <shzam>
Component: Resource ManagementAssignee: Krita Bugs <krita-bugs-null>
Status: CONFIRMED ---    
Severity: wishlist CC: halla
Priority: NOR    
Version First Reported In: 5.0.0-beta5   
Target Milestone: ---   
Platform: Other   
OS: Linux   
Latest Commit: Version Fixed/Implemented In:
Sentry Crash Report:

Description sh_zam 2021-12-09 15:40:35 UTC
STEPS TO REPRODUCE
1. Create a new resource (I've tried with patterns and gradients).
2. Close Krita session.
3. Change the resource by moving in a different resource but with a same filename (Krita seems to handle files in its resources folder in a different manner, it seems?)
4. Open Krita, select the resource.

OBSERVED RESULT
Upon using the resource, the correct resource is painted. However, the thumbnail of the resource is the old one.

EXPECTED RESULT
Thumbnail of the resource should be updated properly. 

ADDITIONAL INFORMATION
I noticed the bug while juggling between two different resource folders, if a same named resource occurs in two different directories and the resource cache isn't created from scratch we get to this buggy behavior. 

Krita version: ./krita-5.0.0-beta5-e18c9f0-x86_64.appimage
Comment 1 amyspark 2022-01-07 16:08:09 UTC
Halla says:

> 13:00:37 amyspark: as for the bug, I always assumed we would compare timestamps for that, not md5sums because we explicitly don't want to load resources on startup

The whole storage needs to be invalidated if the saved timestamp differs from the read one, we don't implement this case currently, so confirming.

> and problems coming from people manually messing up their resource folders isn't something I give a high priority :-)

Marking as wishlist.
Comment 2 Halla Rempt 2022-01-07 18:55:36 UTC
Note that we only expect resources in the folder storage to be actually modified from outside...