ok: fix dbm.error
when .ok_storage
crossed plantforms
When .ok_storage
is created under one system and read under another one, shelf.open
may be not able to use dbm.whichdb
to determine the dbtype and raise a error.
To solve this problem, this patch replaced all shelf.open
to open_shelf
, which will:
- try to use original
shelf.open
; and if this failed: - try to use
dbm.dumb.open
; and if this failed too: - delete the old
.ok_storage
and recreate a new one.
File extensions at L36 are determined according to:
-
the documentation of dbm:
.dat
,.dir
,.pag
- three different environment at my own machine:
.db
,.bak
I've tested it for a Windows-generated .ok_storage
file under Debian system, and dbm.dumb.open
worked. And the reversed test fell to deleting and recreating a new file. Direct shelf.open
also works.
build-cli ci may fail due to SSL error, like #444406, or #444387, thus commit ac478924 is made to resolve this problem. Now build-ci is passed.
build-app also failed in master branch, so this is omitted.