Skip to content

Commit

Permalink
Reorder the position of the error messages
Browse files Browse the repository at this point in the history
This is related to:
#174
  • Loading branch information
fangfufu committed Nov 23, 2024
1 parent adac52c commit 3aaf5a2
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions src/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -858,8 +858,8 @@ Cache *Cache_open(const char *fn)
cf->link = link;

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

lprintf(cache_lock_debug,
"thread %x: unlocking cf_lock;\n", pthread_self());
Expand All @@ -871,8 +871,8 @@ Cache *Cache_open(const char *fn)
* Corrupt metadata
*/
if (Meta_read(cf)) {
Cache_free(cf);
lprintf(error, "metadata error: %s.\n", fn);
Cache_free(cf);

lprintf(cache_lock_debug,
"thread %x: unlocking cf_lock;\n", pthread_self());
Expand Down Expand Up @@ -911,8 +911,8 @@ cf->content_length: %ld, Data_size(fn): %ld.\n", fn, cf->content_length,
}

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

lprintf(cache_lock_debug,
"thread %x: unlocking cf_lock;\n", pthread_self());
Expand Down

0 comments on commit 3aaf5a2

Please sign in to comment.