This file tells us how many DB4 files we're sharding across for actual
key storage. If it's not found, we create it. Only log an error if it's
not that the file doesn't exist.
privctx->numdbs = atoi(buf);
}
fclose(numdb);
- } else if (!readonly) {
+ } else if (errno != ENOENT) {
logthing(LOGTHING_ERROR, "Couldn't open num_keydb: %s",
strerror(errno));
+ } else if (!readonly) {
numdb = fopen(buf, "w");
if (numdb != NULL) {
fprintf(numdb, "%d", privctx->numdbs);