diff --git a/src/ckdb.c b/src/ckdb.c index 8a6b6b54..a8da6d35 100644 --- a/src/ckdb.c +++ b/src/ckdb.c @@ -7561,6 +7561,7 @@ static bool reload_from(tv_t *start) filename = rotating_filename(restorefrom, start->tv_sec); fp = fopen(filename, "r"); if (!fp) { + errno = 0; missing = filename; filename = NULL; missing_count = 1; @@ -7581,6 +7582,7 @@ static bool reload_from(tv_t *start) fp = fopen(filename, "r"); if (fp) break; + errno = 0; if (missing_count++ > 1) free(missing2); missing2 = filename;