diff options
author | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-07 06:34:36 +0300 |
---|---|---|
committer | Jaakko Keränen <jaakko.keranen@iki.fi> | 2021-05-07 06:34:36 +0300 |
commit | bcaa2a3ce76b522679a1db3ca27d3a12a5a6a691 (patch) | |
tree | 962d379aaaac44037300c659f84f719816af8af5 /src | |
parent | 294eb2ed8b925ceb9c3e45d40d9c6ac3c7cb0fa0 (diff) |
GmCerts: Avoid losing identity metadata
idents.lgr format has not been changed, so keep using the old version number in the file.
Diffstat (limited to 'src')
-rw-r--r-- | src/defs.h | 3 | ||||
-rw-r--r-- | src/gmcerts.c | 2 |
2 files changed, 3 insertions, 2 deletions
@@ -30,7 +30,8 @@ enum iFileVersion { | |||
30 | multipleRoots_FileVersion = 2, | 30 | multipleRoots_FileVersion = 2, |
31 | serializedSidebarState_FileVersion = 3, | 31 | serializedSidebarState_FileVersion = 3, |
32 | /* meta */ | 32 | /* meta */ |
33 | latest_FileVersion = 3 | 33 | idents_FileVersion = 1, /* version used by GmCerts/idents.lgr */ |
34 | latest_FileVersion = 3, | ||
34 | }; | 35 | }; |
35 | 36 | ||
36 | /* Icons */ | 37 | /* Icons */ |
diff --git a/src/gmcerts.c b/src/gmcerts.c index 2cc10a3d..35d784f6 100644 --- a/src/gmcerts.c +++ b/src/gmcerts.c | |||
@@ -205,7 +205,7 @@ void saveIdentities_GmCerts(const iGmCerts *d) { | |||
205 | iFile *f = new_File(collect_String(concatCStr_Path(&d->saveDir, identsFilename_GmCerts_))); | 205 | iFile *f = new_File(collect_String(concatCStr_Path(&d->saveDir, identsFilename_GmCerts_))); |
206 | if (open_File(f, writeOnly_FileMode)) { | 206 | if (open_File(f, writeOnly_FileMode)) { |
207 | writeData_File(f, magicIdMeta_GmCerts_, 4); | 207 | writeData_File(f, magicIdMeta_GmCerts_, 4); |
208 | writeU32_File(f, latest_FileVersion); /* version */ | 208 | writeU32_File(f, idents_FileVersion); /* version */ |
209 | iConstForEach(PtrArray, i, &d->idents) { | 209 | iConstForEach(PtrArray, i, &d->idents) { |
210 | const iGmIdentity *ident = i.ptr; | 210 | const iGmIdentity *ident = i.ptr; |
211 | if (~ident->flags & temporary_GmIdentityFlag) { | 211 | if (~ident->flags & temporary_GmIdentityFlag) { |