mirror of
git://git.sv.gnu.org/coreutils.git
synced 2026-04-20 18:56:39 +02:00
Fix things so `mkdir -p' can create very deep directories, e.g.,
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.
This commit is contained in:
@@ -149,13 +149,11 @@ main (int argc, char **argv)
|
||||
|
||||
if (create_parents)
|
||||
{
|
||||
char *parents = dir_name (argv[optind]);
|
||||
fail = make_path (parents, parent_mode, parent_mode,
|
||||
char *dir = argv[optind];
|
||||
fail = make_path (dir, newmode, parent_mode,
|
||||
-1, -1, 1, verbose_fmt_string);
|
||||
free (parents);
|
||||
}
|
||||
|
||||
if (fail == 0)
|
||||
else
|
||||
{
|
||||
const char *dir = argv[optind];
|
||||
int dir_created;
|
||||
|
||||
Reference in New Issue
Block a user