Skip to content
Commit ab6f6c4a authored by Stefano Bonicatti's avatar Stefano Bonicatti
Browse files

Fix to resource md5 generation

Now the md5 will be calculated on the file data instead of the one in
memory that has been interpreted, to keep the result consistent.

Reactivated the code that warns the user and avoids to install resources
when they have a different md5 from the manifest one.

Reactivated the bundle edit button in Manage Resources.

Added KoHashGenerator, KoMD5Generator, KisMD5Generator,
KoHashGeneratorProvider classes.
The first is an abstract class which gives a base to implement an
hash generator that accepts a filename or a byte array to generate
its hash.
The second is an implementation of the first with the MD5 algorithm.
The third overrides the first on the function that generates the md5
from the filename, to support Krita resource bundles.
The fourth is the one that provides the correct generator when asked.
The hash generator identification is a string.

Added versioning of the bundle through a simple increasing integer
string.
All the bundles which doesn't have the version in their meta are
recreated and the md5 of each resource is recalculated.
An old version of the bundle is mantained (bundlename.bundle.old).

REVIEW: 122678
CCMAIL: kimageshop@kde.org
parent 8cff3e47
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment