tools: only print out creating directory the first time.
authorRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Aug 2010 13:09:04 +0000 (22:39 +0930)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 30 Aug 2010 13:09:04 +0000 (22:39 +0930)
tools/tools.c

index 2983cfca663bc730130899ae96cb16a75e62baa2..a4944bd1f8988b43cf63e63ac42460a0d1643529 100644 (file)
@@ -204,9 +204,9 @@ char *temp_dir(const void *ctx)
                        err(1, "mkdir %s failed", tmpdir);
                }
                talloc_set_destructor(tmpdir, unlink_all);
+               if (tools_verbose)
+                       printf("Created temporary directory %s\n", tmpdir);
        }
-       if (tools_verbose)
-               printf("Created temporary directory %s\n", tmpdir);
        return tmpdir;
 }