Browse Source

ckdb - reload clear errno

master
kanoi 10 years ago
parent
commit
86913036ac
  1. 2
      src/ckdb.c

2
src/ckdb.c

@ -7561,6 +7561,7 @@ static bool reload_from(tv_t *start)
filename = rotating_filename(restorefrom, start->tv_sec); filename = rotating_filename(restorefrom, start->tv_sec);
fp = fopen(filename, "r"); fp = fopen(filename, "r");
if (!fp) { if (!fp) {
errno = 0;
missing = filename; missing = filename;
filename = NULL; filename = NULL;
missing_count = 1; missing_count = 1;
@ -7581,6 +7582,7 @@ static bool reload_from(tv_t *start)
fp = fopen(filename, "r"); fp = fopen(filename, "r");
if (fp) if (fp)
break; break;
errno = 0;
if (missing_count++ > 1) if (missing_count++ > 1)
free(missing2); free(missing2);
missing2 = filename; missing2 = filename;

Loading…
Cancel
Save