Closed schulbus13 closed 1 year ago
The Dom implementation intentionally leaves things as it finds them, but as you say at a cost of speed. For the other two it looks like there is a mapping missing.
I have been looking at this and as mentioned custom icons are mapped incorrectly, which affects both Jaxb and Simple.
I have reproduced and fixed the crash on load of custom icons in Simple.
I think that the problem with Jaxb losing the icon is probably because it saves custom icons incorrectly because of the incorrect mapping. I don't understand why icon 48 is chosen, but that's perhaps not really significant.
All of this is being done in the context of checking the operation of V4 file format which requires some more work.
Closed in 2.2.1
I was given a manually created kdbx file containing a few custom icons. If I load (and edit, but thats not yet relevant) and save the database with KeePassJava2, the following problems occur, depending on the kind of database implementation I use:
SimpleDatabase
SimpleDatabase.load(creds, input).save(creds, output);
The following error is thrown
JaxbDatabase
JaxbDatabase.load(creds, input).save(creds, output);
No error is thrown, but the custom icons are replaced with default blue folder icon (48). Also the entire file is skipped when I try to search something via the desktop application (Searching entries in this group: Disabled), which wasn't the case before.
DomDatabaseWrapper
DomDatabaseWrapper.load(creds, input).save(creds, output)
Custom icons are still there and I can also still search via the desktop application, but the loading and saving takes a very long time (a couple of minutes for a ~200kB file).
Is there a way to preserve the custom icons and the searchability while using one of the faster database implementations?