files previously created as v4.1 will be written as v4.0

This commit is contained in:
antelle 2020-04-07 17:07:05 +02:00
parent 8015da09e8
commit b2e69b60a6
No known key found for this signature in database
GPG Key ID: 094A2F2D6136A4EE
2 changed files with 15 additions and 0 deletions

View File

@ -33,6 +33,7 @@ class FileModel extends Model {
if (keyFileData) {
kdbxweb.ByteUtils.zeroBuffer(keyFileData);
}
this.fixVersion();
logger.info(
'Opened file ' +
this.name +
@ -250,6 +251,17 @@ class FileModel extends Model {
});
}
fixVersion() {
if (
this.db.meta.generator === 'KdbxWeb' &&
this.db.header.versionMajor === 4 &&
this.db.header.versionMinor === 1
) {
this.db.header.versionMinor = 0;
logger.info('Fixed file version: 4.1 => 4.0');
}
}
reload() {
this.buildObjectMap();
this.readModel();

View File

@ -1,5 +1,8 @@
Release notes
-------------
##### v1.13.2 (TBD)
`+` files previously created as v4.1 will be written as v4.0
##### v1.13.1 (2020-04-04)
`-` fix #1444: fixed website favicons and attached images
`-` fix #1445: fixed offline mode in Chrome and Firefox