From: Rusty Russell Date: Thu, 7 Oct 2010 02:43:26 +0000 (+1030) Subject: ccanlint: rename files on collision even with keep=true. X-Git-Url: http://git.ozlabs.org/?p=ccan;a=commitdiff_plain;h=0f66da713a750c995bb59452a95f4a71fdd8a58c ccanlint: rename files on collision even with keep=true. --- diff --git a/tools/tools.c b/tools/tools.c index d27db719..16246593 100644 --- a/tools/tools.c +++ b/tools/tools.c @@ -235,7 +235,7 @@ char *maybe_temp_file(const void *ctx, const char *extension, bool keep, suffix, extension); talloc_free(suffix); suffix = talloc_asprintf(ctx, "-%u", ++count); - } while (!keep && lstat(f, &st) == 0); + } while (lstat(f, &st) == 0); if (tools_verbose) printf("Creating file %s\n", f);