diff options
author | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-01-13 04:43:48 +0000 |
---|---|---|
committer | erik <erik@69ca8d6d-28ef-0310-b511-8ec308f3f277> | 2000-01-13 04:43:48 +0000 |
commit | 4da0541f2b3c3053c2a7b5328ab19f9a47763b06 (patch) | |
tree | 990a3d6a9beb21420fae1f7d14886c84a5ce3c12 /coreutils/mkdir.c | |
parent | 9738fe101855ce85f457dd2531be97c663a02281 (diff) | |
download | busybox-w32-4da0541f2b3c3053c2a7b5328ab19f9a47763b06.tar.gz busybox-w32-4da0541f2b3c3053c2a7b5328ab19f9a47763b06.tar.bz2 busybox-w32-4da0541f2b3c3053c2a7b5328ab19f9a47763b06.zip |
Bug fixes.
-Erik
git-svn-id: svn://busybox.net/trunk/busybox@303 69ca8d6d-28ef-0310-b511-8ec308f3f277
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 | } |