Skip to content

Commit

Permalink
improved error message
Browse files Browse the repository at this point in the history
  • Loading branch information
fangfufu committed Dec 1, 2024
1 parent 6cd006c commit eca4375
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -760,8 +760,8 @@ int Cache_create(const char *path)
Meta_create(cf);

if (Meta_open(cf)) {
Cache_free(cf);
lprintf(error, "cannot open metadata file, %s.\n", fn);
Cache_free(cf);
}

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

Data_create(cf);

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

int res = Cache_exist(fn);
Expand Down

0 comments on commit eca4375

Please sign in to comment.