(main): Adjust to new make_dir_parents convention.

This commit is contained in:
Paul Eggert 2005-06-14 18:35:58 +00:00
parent f7bbc5d1a2
commit 7cc0d42200
2 changed files with 3 additions and 9 deletions

View File

@ -360,7 +360,6 @@ main (int argc, char **argv)
bool cwd_not_restored = false;
for (i = 0; i < n_files; i++)
{
bool different_cwd;
if (cwd_not_restored && IS_RELATIVE_FILE_NAME (argv[optind]))
{
error (0, 0,
@ -374,8 +373,7 @@ main (int argc, char **argv)
ok &=
make_dir_parents (file[i], mode, mode, owner_id, group_id, false,
(x.verbose ? _("creating directory %s") : NULL),
&different_cwd);
cwd_not_restored |= different_cwd;
&cwd_not_restored);
}
}
else

View File

@ -87,7 +87,7 @@ main (int argc, char **argv)
const char *verbose_fmt_string = NULL;
int exit_status = EXIT_SUCCESS;
int optc;
bool cwd_not_restored;
bool cwd_not_restored = false;
initialize_main (&argc, &argv);
program_name = argv[0];
@ -146,8 +146,6 @@ main (int argc, char **argv)
umask (umask_value);
}
/* FIXME: when we assume C99, declare this here. */
cwd_not_restored = false;
for (; optind < argc; ++optind)
{
bool ok;
@ -163,12 +161,10 @@ main (int argc, char **argv)
if (create_parents)
{
bool different_cwd;
char *dir = argv[optind];
ok = make_dir_parents (dir, newmode, parent_mode,
-1, -1, true, verbose_fmt_string,
&different_cwd);
cwd_not_restored |= different_cwd;
&cwd_not_restored);
}
else
{