mirror of
https://github.com/clearlinux/hyperstart.git
synced 2026-08-25 00:25:50 +00:00
Merge pull request #62 from laijs/mkdir
print mkdir info in correct order
This commit is contained in:
+1
-1
@@ -143,7 +143,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;
|
||||
@@ -169,6 +168,7 @@ int hyper_mkdir(char *hyper_path)
|
||||
*p = '/';
|
||||
}
|
||||
|
||||
fprintf(stdout, "create directory %s\n", path);
|
||||
if (mkdir(path, 0755) < 0 && errno != EEXIST)
|
||||
return -1;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user