diff options
-rw-r--r-- | src/install.c | 4 | ||||
-rwxr-xr-x | tests/install/basic-1 | 1 |
2 files changed, 3 insertions, 2 deletions
diff --git a/src/install.c b/src/install.c index e913cb2a0..f69eaaf4d 100644 --- a/src/install.c +++ b/src/install.c @@ -325,7 +325,7 @@ main (int argc, char **argv) n_files = argc - optind; file = argv + optind; - if (n_files <= !(dir_arg || target_directory)) + if (n_files <= ! (dir_arg || target_directory)) { if (n_files <= 0) error (0, 0, _("missing file operand")); @@ -347,7 +347,7 @@ main (int argc, char **argv) usage (EXIT_FAILURE); } } - else if (!target_directory) + else if (! (dir_arg || target_directory)) { if (2 <= n_files && target_directory_operand (file[n_files - 1])) target_directory = file[--n_files]; diff --git a/tests/install/basic-1 b/tests/install/basic-1 index eb5e627e5..66df30415 100755 --- a/tests/install/basic-1 +++ b/tests/install/basic-1 @@ -61,5 +61,6 @@ test "$1" = -r-xr-xr-x || fail=1 # These failed in coreutils CVS from 2004-06-25 to 2004-08-11. ginstall -d . || fail=1 ginstall -d newdir || fail=1 +ginstall -d newdir1 newdir2 newdir3 || fail=1 (exit $fail); exit $fail |