From 12ba0a42b2db224e96a583b8526cc0eea8cc1af3 Mon Sep 17 00:00:00 2001 From: Lai Jiangshan Date: Fri, 1 Apr 2016 23:03:41 +0800 Subject: [PATCH] print mkdir info in correct order and only print it when it is needed to be maked. Signed-off-by: Lai Jiangshan --- src/util.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/util.c b/src/util.c index 9e7d953..a3f0456 100644 --- a/src/util.c +++ b/src/util.c @@ -108,7 +108,6 @@ int hyper_mkdir(char *hyper_path) return -1; } - fprintf(stdout, "create directory %s\n", path); if (stat(path, &st) >= 0) { if (S_ISDIR(st.st_mode)) return 0; @@ -134,6 +133,7 @@ int hyper_mkdir(char *hyper_path) *p = '/'; } + fprintf(stdout, "create directory %s\n", path); if (mkdir(path, 0755) < 0 && errno != EEXIST) return -1;