From 3575a9a2877005995be1076eccec390be65b78d6 Mon Sep 17 00:00:00 2001 From: Joel Rosdahl Date: Mon, 12 Mar 2018 22:05:17 +0100 Subject: [PATCH] cleanup: Log size before cleaning --- src/cleanup.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/src/cleanup.c b/src/cleanup.c index e0b4c620c..557a5ad8b 100644 --- a/src/cleanup.c +++ b/src/cleanup.c @@ -186,15 +186,19 @@ clean_up_dir(struct conf *conf, const char *dir, float limit_multiple) traverse(dir, traverse_fn); // Clean the cache. + cc_log("Before cleanup: %lu KiB, %zu files", + (unsigned long)cache_size / 1024, + files_in_cache); bool cleaned = sort_and_clean(); + cc_log("After cleanup: %lu KiB, %zu files", + (unsigned long)cache_size / 1024, + files_in_cache); + if (cleaned) { cc_log("Cleaned up cache directory %s", dir); stats_add_cleanup(dir, 1); } - cc_log("After cleanup: %lu KiB, %zu files", - (unsigned long)cache_size / 1024, - files_in_cache); stats_set_sizes(dir, files_in_cache, cache_size); // Free it up. -- 2.47.2