Bug 392415

Summary: Krita tries to load bundle resources with the wrong path on startup
Product: [Applications] krita Reporter: Alvin Wong <alvin>
Component: Resource ManagementAssignee: Halla Rempt <halla>
Status: RESOLVED FIXED    
Severity: normal CC: emmetoneill.pdx, halla
Priority: NOR Keywords: triaged
Version First Reported In: 4.0   
Target Milestone: ---   
Platform: Microsoft Windows   
OS: Microsoft Windows   
Latest Commit: Version Fixed In:
Sentry Crash Report:

Description Alvin Wong 2018-03-27 14:58:49 UTC
Can be observed with Process Monitor with the following steps:

1. Place a .kra file on a directory that does not contain the Krita install to be started (using `C:\Users\Alvin\Desktop` here)
2. Start Process Monitor, add filters:
  - Process Name is `krita.exe`
  - Path contains `C:\Users\Alvin\Desktop`
3. Double-click on the .kra file to start Krita (make sure Krita isn't already opened or that multiple instances are allowed
4. You should see a bunch of failed file open attempts in Process Monitor with "bundle:" in the path

A bunch of them look like `C:\Users\Alvin\Desktop\bundle:\C:\Program Files\Krita (x64)\share\krita\bundles\Krita_4_Default_Resources.bundle:brushes\abominable_snowman.png`. The most probable cause would be some code treating the path as real filesystem paths (processed with Qt's file-related functions) and causing a forward slash to become a backward slash.

<boud> um
<boud> bundle:\ looks really weird
<boud> krita checks for bundle:/ to see if something is part of a bundle
Comment 1 Halla Rempt 2021-03-30 12:37:29 UTC
Since 9ef4129d9f, the bundle:// convention is no longer used.