summaryrefslogtreecommitdiff
path: root/src/mkdir.c
AgeCommit message (Collapse)Author
2006-01-02Include lchmod.h.Paul Eggert
(usage): Clarify -m's operation. (main): Use lchmod rather than chmod. Don't use lchmod unless the new mode contains bits outside the 777 range.
2005-12-19(main) Avoid a minor race condition when `-m MODE' is specified, by usingJim Meyering
open, fchown, and close rather than just chown. To do that reliably (even with an overly restrictive umask), ensure that each mkdir call uses a mode including at least owner-read access.
2005-06-14(create_parents): Remove static var (now local to 'main').Paul Eggert
(main): Standardize on a diagnostic for restore_cwd failure, and report errno. Don't bother to check cwd_errno unless create_parents. Use mkdir rather than make_dir; it's simpler.
2005-06-14(main): Adjust to new make_dir_parents convention.Paul Eggert
2005-06-14tweak diagnostic wording: Use `... return to working directory', ratherJim Meyering
than `... restore working directory'.
2005-06-13(main): When make_dir_parents changes the current workingJim Meyering
directory, give a diagnostic about each subsequent failure to create a dot-relative directory.
2005-06-02Don't use "path" or "filename".Paul Eggert
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-14Update FSF postal mail address.Jim Meyering
2005-05-01mode_free -> freePaul Eggert
2005-04-28(main): Adjust to new modechange API.Paul Eggert
Also, free the mode_change object when done.
2005-04-22(main): Compile mode with MODE_MASK_ALL and initial umask.Paul Eggert
2004-09-21Remove unused "case 0".Paul Eggert
2004-07-30(create_parents, main): Use bool when appropriate.Paul Eggert
(main): Use EXIT_SUCCESS/EXIT_FAILURE instead of 0/1.
2004-06-21(main): Standardize on the diagnostics given when someone givesJim Meyering
too few operands ("missing operand after `xxx'") or too many operands ("extra operand `xxx'"). Include "quote.h" and/or "error.h" if it wasn't already being included.
2004-01-21(usage): Use EXIT_SUCCESS, not 0, for clarity.Jim Meyering
2003-10-18Most .c files (AUTHORS): Revert the WRITTEN_BY/AUTHORS changeJim Meyering
of 2003-09-19. Now, AUTHORS is a comma-separated list of strings. Update the call to parse_long_options so that `AUTHORS, NULL' are the last parameters. * src/true.c (main): Append NULL to version_etc argument list. * src/sys2.h (case_GETOPT_VERSION_CHAR): Likewise.
2003-09-18(WRITTEN_BY): Rename from AUTHORS.Jim Meyering
Begin each WRITTEN_BY string with `Written by ' and end it with `.'. Mark each WRITTEN_BY string as translatable.
2003-06-17(main): Call initialize_main.Jim Meyering
2002-09-28Fix things so `mkdir -p' can create very deep directories, e.g.,Jim Meyering
mkdir -p $(perl -e 'print "a/" x 40000') now works. (main): For --parents (-p), call make_path with the entire directory name, so we don't ever require that file operations like stat or chmod be performed on the entire command line argument.
2002-08-31Change `exit (0)' to `exit (EXIT_SUCCESS)',Jim Meyering
`exit (1)' to `exit (EXIT_FAILURE)', and `usage (1)' to `usage (EXIT_FAILURE)'.
2002-08-30Change `error (1, ...' to `error (EXIT_FAILURE, ...'.Jim Meyering
2002-07-02(usage): Use the PACKAGE_BUGREPORT e-mail address, rather than hard-coding it.Jim Meyering
2001-12-02Use new macros, HELP_OPTION_DESCRIPTION and VERSION_OPTION_DESCRIPTIONJim Meyering
instead of hard-coding --help and --version descriptions.
2001-11-23(usage): Note that ``Mandatory arguments to long options are mandatoryJim Meyering
for short options too.''
2001-11-23Split usage strings so that --help and --versionJim Meyering
descriptions are alone in their own string.
2001-09-15(main): Don't strip trailing slashes; POSIX doesn't allow it here.Jim Meyering
Don't include "dirname.h" when no longer needed.
2001-05-12(strip_trailing_slashes): Remove declaration; now in dirname.h.Jim Meyering
2001-02-21(main): Remove assignment-in-if-expression.Jim Meyering
In fact, remove t_errno altogether.
2000-12-02(main): Remove any trailing slash unconditionally.Jim Meyering
Reported by Volker Borchert.
2000-11-18(main): When failing to create a directory, give onlyJim Meyering
one diagnostic, not two. Reported by Volker Borchert.
2000-11-18(main): With --parents, remove any trailing slashesJim Meyering
from the argument to the final mkdir call. Required for NetBSD.
2000-11-09Do not set the permissions of the final directoryJim Meyering
component if it was not just created. Based on a patch from Volker Borchert.
2000-11-05(main): Use make_dir instead of using mkdir directly.Jim Meyering
Diagnose as failure when mkdir tries to create (without the --parent (-p) option) a directory that already exists.
2000-11-01remove const attribute for PARENTSJim Meyering
2000-11-01Fix bad typo! free the string, PARENTS, not the function, dir_name.Jim Meyering
2000-10-31`mkdir -p' would create parent directories with permissionsJim Meyering
that did not account for the umask. [introduced with the 2000-09-30 change that became part of fileutils-4.0.28] Include dirname.h. Compute the parent directory `mode' unconditionally, effectively as `$(umask -S),u+wx'. Use make_path to create only the parent directories, thus using the same code, both with and without -p, to create the final component in each file name. Reported by Bob Proulx.
2000-09-30(main): Rename local `symbolic_mode' to `specified_mode'.Jim Meyering
2000-09-30(main): Don't set the umask to 0 and hand-applyJim Meyering
the previously-set umask unconditionally. Do that only when a MODE has been specified. Otherwise, call mkdir with the full creation mask (0777 or 0666) and let the kernel apply the umask. The difference shows up only on file systems with ACL support when the containing directory has a default ACL. Patch by Andreas Gruenbacher.
2000-09-08(S_IRWXUGO): Remove definition.Jim Meyering
2000-08-08(main): Invoke xalloc_die instead of printing our own message.Jim Meyering
2000-07-30Convert "`%s'" in format strings to "%s", and wrap eachJim Meyering
corresponding argument in a `quote (...)' call.
2000-06-03Allow -v as synonym for --verbose, to be consistent with other fileutils.Jim Meyering
2000-05-13Arrange to call close_stdout only upon exit.Jim Meyering
2000-04-26Rename global: s/path_mode/create_parents/.Jim Meyering
(main): No longer perform explicit chmod when creating parent directories, since make_path now does the chmod.
1999-11-17(S_IRWXUGO): Define if necessary.Jim Meyering
(main): Use chmod to set the permissions if bits other than those of S_IRWXUGO were requested. Reported by Sami Farin.
1999-05-07(main): Use better wording in diagnostic: `cannotJim Meyering
create directory' rather than `cannot make directory'. The former also matches the one in makepath.c.
1999-04-26(main): Use proper mode_t types and macros.Jim Meyering
Don't assume the traditional Unix values for mode bits.
1999-04-01(main): Qualify a char* with the `const' keyword.Jim Meyering
1999-03-31Don't include closeout.h or version-etc.h explicitly. Now, they're included ↵Jim Meyering
via sys2.h.