When making parent directories set permissions based on the base parent tree rather than the new directory to be created.

This commit is contained in:
Glenn L McGrath
2002-11-24 22:48:20 +00:00
parent eda4f53f2e
commit 822e7fd587
2 changed files with 29 additions and 9 deletions

View File

@ -41,8 +41,10 @@ extern int mkdir_main (int argc, char **argv)
switch (opt) {
case 'm':
mode = 0777;
if (!parse_mode (optarg, &mode))
if (!parse_mode (optarg, &mode)) {
error_msg_and_die ("invalid mode `%s'", optarg);
}
umask(0);
break;
case 'p':
flags |= FILEUTILS_RECUR;