From 3aaf5a294ab2fa954e3969cf545819bce1734a64 Mon Sep 17 00:00:00 2001 From: Fufu Fang Date: Sat, 23 Nov 2024 01:24:54 +0000 Subject: [PATCH] Reorder the position of the error messages This is related to: https://github.com/fangfufu/httpdirfs/issues/174 --- src/cache.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/cache.c b/src/cache.c index 6bcca4e..d061e1f 100644 --- a/src/cache.c +++ b/src/cache.c @@ -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()); @@ -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()); @@ -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());