Hi,

On Wed, Aug 11, 2004 at 01:21:18AM +0400, Dmitry V. Levin wrote:
> On Sat, Jun 26, 2004 at 12:06:19AM -0700, Paul Eggert wrote:
[...]
> Proposed fix is attached.

This fix is not complete, there is one more regression:
$ install -d newdir{1,2,3}            
install: target `newdir3' is not a directory

Proposed fix for both cases is attached.


-- 
ldv
2004-08-12  Dmitry V. Levin  <[EMAIL PROTECTED]>

        * src/install.c (main): Fix -d regression introduced with
        --target-directory support on 2004-06-25.

--- src/install.c.orig  2004-08-12 01:32:49 +0400
+++ src/install.c       2004-08-12 01:34:28 +0400
@@ -325,7 +325,7 @@ main (int argc, char **argv)
   n_files = argc - optind;
   file = argv + optind;
 
-  if (n_files <= !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];

Attachment: pgpSiZaJ0D4lH.pgp
Description: PGP signature

_______________________________________________
Bug-coreutils mailing list
[EMAIL PROTECTED]
http://lists.gnu.org/mailman/listinfo/bug-coreutils

Reply via email to