Skip to content

Fix saving to bundles

  • fixed saving resources with spaces in a filename to a bundle (while still allowing sanitizing/prettifying filenames like Resource.0001.kpp to be Resource.kpp in the bundle)
  • fixed saving patterns with .png suffix to be saved correctly into the bundle (and not with .pat.png suffix)
  • fixed removing storages that has been deleted from the resource folder (in case there were two or more with names that are one just after the other, like Bundle1, Bundle2, Bundle3 etc.)
  • search for resources to add to the bundle in all resources instead of only the active ones (this might not be needed, or even wanted?)
  • Return false if the resource couldn't be saved into the bundle - only affects mypaint resources whose thumbnails was saved, so I guess... it's probably a nearly impossible situation to be in

Test Plan

  1. Create a brush preset that uses one of the PNG pattern files.
  2. Make sure its name has a space in it.
  3. Try to save it into a bundle.
  4. If it works, then great, the MR is correct.

Formalities Checklist

  • I confirmed this builds.
  • I confirmed Krita ran and the relevant functions work.
  • I tested the relevant unit tests and can confirm they are not broken. (If not possible, don't hesitate to ask for help!)
  • I made sure my commits build individually and have good descriptions as per KDE guidelines.
  • I made sure my code conforms to the standards set in the HACKING file.
  • I can confirm the code is licensed and attributed appropriately, and that unattributed code is mine, as per KDE Licensing Policy.

Merge request reports