Skip to content
  • Stefano Bonicatti's avatar
    Fix to resource md5 generation · e731c466
    Stefano Bonicatti authored
    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
    e731c466