Skip to content

Commit eca4375

Browse files
committed
improved error message
1 parent 6cd006c commit eca4375

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/cache.c

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -760,8 +760,8 @@ int Cache_create(const char *path)
760760
Meta_create(cf);
761761

762762
if (Meta_open(cf)) {
763-
Cache_free(cf);
764763
lprintf(error, "cannot open metadata file, %s.\n", fn);
764+
Cache_free(cf);
765765
}
766766

767767
if (Meta_write(cf)) {
@@ -776,6 +776,7 @@ int Cache_create(const char *path)
776776

777777
Data_create(cf);
778778

779+
lprintf(cache_lock_debug, "Flusing cache file for %s after creating.\n", fn);
779780
Cache_free(cf);
780781

781782
int res = Cache_exist(fn);

0 commit comments

Comments
 (0)