зеркало из https://github.com/mozilla/pjs.git
Update the version field in the handle when doing the automatic update.
This commit is contained in:
Родитель
3a34302641
Коммит
20ddb4063a
|
@ -32,7 +32,7 @@
|
|||
*
|
||||
* Private Key Database code
|
||||
*
|
||||
* $Id: keydb.c,v 1.17 2002-04-11 00:59:42 relyea%netscape.com Exp $
|
||||
* $Id: keydb.c,v 1.18 2002-04-12 03:43:34 relyea%netscape.com Exp $
|
||||
*/
|
||||
|
||||
#include "lowkeyi.h"
|
||||
|
@ -892,11 +892,17 @@ newdb:
|
|||
handle->db = rdbopen( appName, prefix, "key", NO_CREATE);
|
||||
handle->updatedb = dbopen( dbname, NO_RDONLY, 0600, DB_HASH, 0 );
|
||||
if (handle->updatedb) {
|
||||
handle->version = nsslowkey_version(handle->updatedb);
|
||||
if (handle->version != NSSLOWKEY_DB_FILE_VERSION) {
|
||||
(*handle->updatedb->close)(handle->updatedb);
|
||||
handle->updatedb = NULL;
|
||||
} else {
|
||||
db_Copy(handle->db, handle->updatedb);
|
||||
(*handle->updatedb->close)(handle->updatedb);
|
||||
handle->updatedb = NULL;
|
||||
goto done;
|
||||
}
|
||||
}
|
||||
} else {
|
||||
handle->db = dbopen( dbname, NO_CREATE, 0600, DB_HASH, 0 );
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче