From 05df239ed90584156b820dbf3ede638208eb440f Mon Sep 17 00:00:00 2001 From: Erik Andersen Date: Thu, 13 Jan 2000 04:43:48 +0000 Subject: Bug fixes. -Erik --- coreutils/mkdir.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'coreutils/mkdir.c') 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) strcpy (buf, *argv); status=stat(buf, &statBuf); - if (status != -1 && status != ENOENT ) { + if (parentFlag == FALSE && status != -1 && status != ENOENT ) { fprintf(stderr, "%s: File exists\n", buf); exit( FALSE); } @@ -93,7 +93,7 @@ extern int mkdir_main(int argc, char **argv) createPath(buf, mode); } else { - if (mkdir (buf, mode) != 0) { + if (mkdir (buf, mode) != 0 && parentFlag == FALSE) { perror(buf); exit( FALSE); } -- cgit v1.2.3