Further fix for -d regression.
authorPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Aug 2004 23:41:44 +0000 (23:41 +0000)
committerPaul Eggert <eggert@cs.ucla.edu>
Wed, 11 Aug 2004 23:41:44 +0000 (23:41 +0000)
src/install.c
tests/install/basic-1

index e913cb2..f69eaaf 100644 (file)
@@ -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];
index eb5e627..66df304 100755 (executable)
@@ -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