diff options
author | Erik Andersen <andersen@codepoet.org> | 2000-01-13 04:43:48 +0000 |
---|---|---|
committer | Erik Andersen <andersen@codepoet.org> | 2000-01-13 04:43:48 +0000 |
commit | 05df239ed90584156b820dbf3ede638208eb440f (patch) | |
tree | 990a3d6a9beb21420fae1f7d14886c84a5ce3c12 /coreutils/mkdir.c | |
parent | 9a9a261569df0c88038de48eb233890ca189e9c0 (diff) | |
download | busybox-w32-05df239ed90584156b820dbf3ede638208eb440f.tar.gz busybox-w32-05df239ed90584156b820dbf3ede638208eb440f.tar.bz2 busybox-w32-05df239ed90584156b820dbf3ede638208eb440f.zip |
Bug fixes.
-Erik
Diffstat (limited to 'coreutils/mkdir.c')
-rw-r--r-- | coreutils/mkdir.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/coreutils/mkdir.c b/coreutils/mkdir.c index 9ea3b4ea0..dc245a18e 100644 --- a/coreutils/mkdir.c +++ b/coreutils/mkdir.c | |||
@@ -84,7 +84,7 @@ extern int mkdir_main(int argc, char **argv) | |||
84 | 84 | ||
85 | strcpy (buf, *argv); | 85 | strcpy (buf, *argv); |
86 | status=stat(buf, &statBuf); | 86 | status=stat(buf, &statBuf); |
87 | if (status != -1 && status != ENOENT ) { | 87 | if (parentFlag == FALSE && status != -1 && status != ENOENT ) { |
88 | fprintf(stderr, "%s: File exists\n", buf); | 88 | fprintf(stderr, "%s: File exists\n", buf); |
89 | exit( FALSE); | 89 | exit( FALSE); |
90 | } | 90 | } |
@@ -93,7 +93,7 @@ extern int mkdir_main(int argc, char **argv) | |||
93 | createPath(buf, mode); | 93 | createPath(buf, mode); |
94 | } | 94 | } |
95 | else { | 95 | else { |
96 | if (mkdir (buf, mode) != 0) { | 96 | if (mkdir (buf, mode) != 0 && parentFlag == FALSE) { |
97 | perror(buf); | 97 | perror(buf); |
98 | exit( FALSE); | 98 | exit( FALSE); |
99 | } | 99 | } |