NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: bin/41736: pax reports an error when copying zero files



The following reply was made to PR bin/41736; it has been noted by GNATS.

From: Lloyd Parkes <lloyd%must-have-coffee.gen.nz@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: bin/41736: pax reports an error when copying zero files
Date: Thu, 16 Jul 2009 13:24:58 +1200

 The following patch fixes the problem.
 
 ftree_arg() returns 0 if there are more files to process and -1 if  
 there aren't. The old code in ftree_start() considers a lack of files  
 to be an error. This patch just makes it return (slightly) early  
 instead of signalling an error.
 
 Index: bin/pax/ftree.c
 ===================================================================
 RCS file: /vol/src/rsync-src/src/bin/pax/ftree.c,v
 retrieving revision 1.40
 diff -u -r1.40 ftree.c
 --- ftree.c     14 Feb 2009 08:10:06 -0000      1.40
 +++ ftree.c     16 Jul 2009 01:18:34 -0000
 @@ -194,7 +194,7 @@
          }
 
          if (ftree_arg() < 0)
 -               return -1;
 +               return 0;       /* Nothing to do, so stop now. */
          if (tflag && (atdir_start() < 0))
                  return -1;
          return 0;
 


Home | Main Index | Thread Index | Old Index