Mercurial > geeqie
diff src/cache_maint.c @ 506:fc9c8a3e1a8b
Handle the newline in DEBUG_N() macro instead of adding one
in each debug message string.
author | zas_ |
---|---|
date | Thu, 24 Apr 2008 00:15:03 +0000 |
parents | c7a2471e5c4e |
children | 135570a8bd96 |
line wrap: on
line diff
--- a/src/cache_maint.c Wed Apr 23 23:52:20 2008 +0000 +++ b/src/cache_maint.c Thu Apr 24 00:15:03 2008 +0000 @@ -155,7 +155,7 @@ if (!cm->list) { - DEBUG_1("purge chk done.\n"); + DEBUG_1("purge chk done."); cm->idle_id = -1; cache_maintain_home_stop(cm); return FALSE; @@ -163,7 +163,7 @@ path = cm->list->data; - DEBUG_1("purge chk (%d) \"%s\"\n", (cm->clear && !cm->metadata), path); + DEBUG_1("purge chk (%d) \"%s\"", (cm->clear && !cm->metadata), path); if (g_list_find(cm->done_list, path) == NULL) { @@ -357,7 +357,7 @@ GList *flist = NULL; gint still_have_a_file = FALSE; - DEBUG_1("maintainance check: %s\n", dir); + DEBUG_1("maintainance check: %s", dir); base_length = strlen(homedir()) + strlen("/") + strlen(GQ_CACHE_RC_THUMB); base = g_strconcat(homedir(), "/", GQ_CACHE_RC_THUMB, dir, NULL); @@ -373,7 +373,7 @@ if (recursive && strlen(path) > base_length && !cache_maintain_home_dir(path + base_length, recursive, clear)) { - DEBUG_1("Deleting thumb dir: %s\n", path); + DEBUG_1("Deleting thumb dir: %s", path); if (!rmdir_utf8(path)) { printf("Unable to delete dir: %s\n", path); @@ -454,7 +454,7 @@ { if (!unlink_file(path)) { - DEBUG_1("Failed to remove cache file %s\n", path); + DEBUG_1("Failed to remove cache file %s", path); still_have_a_file = TRUE; } } @@ -495,7 +495,7 @@ if (!move_file(src, dest)) { - DEBUG_1("Failed to move cache file %s\nto %s\n", src, dest); + DEBUG_1("Failed to move cache file \"%s\" to \"%s\"", src, dest); /* we remove it anyway - it's stale */ unlink_file(src); } @@ -556,7 +556,7 @@ { if (path && isfile(path) && !unlink_file(path)) { - DEBUG_1("Failed to remove cache file %s\n", path); + DEBUG_1("Failed to remove cache file %s", path); } } @@ -597,7 +597,7 @@ path = cache_get_location(CACHE_TYPE_METADATA, fd->change->dest, TRUE, NULL); if (!copy_file(src_cache, path)) { - DEBUG_1("failed to copy metadata %s to %s\n", src_cache, path); + DEBUG_1("failed to copy metadata %s to %s", src_cache, path); } g_free(path); } @@ -928,7 +928,7 @@ next_path = cd->list->data; cd->list = g_list_remove(cd->list, next_path); - DEBUG_1("thumb removed: %s\n", next_path); + DEBUG_1("thumb removed: %s", next_path); unlink_file(next_path); g_free(next_path); @@ -956,7 +956,7 @@ { if (!valid) { - DEBUG_1("thumb cleaned: %s\n", path); + DEBUG_1("thumb cleaned: %s", path); unlink_file(path); }