delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp-workers/2002/09/27/04:17:29

From: "Juan Manuel Guerrero" <ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De>
Organization: Darmstadt University of Technology
To: djgpp-workers AT delorie DOT com
Date: Fri, 27 Sep 2002 10:13:21 +0100
Subject: Re: link specific bug in djtar
In-reply-to: <200209261617.g8QGHbv05036@envy.delorie.com>
References: <CCCCBDC30A7 AT HRZ1 DOT hrz DOT tu-darmstadt DOT de> (ST001906 AT HRZ1 DOT HRZ DOT TU-Darmstadt DOT De)
X-mailer: Pegasus Mail for Windows (v2.54DE)
Message-ID: <CDD02EA1E1B@HRZ1.hrz.tu-darmstadt.de>
X-MailScanner: Found to be clean
Reply-To: djgpp-workers AT delorie DOT com
Errors-To: nobody AT delorie DOT com
X-Mailing-List: djgpp-workers AT delorie DOT com
X-Unsubscribes-To: listserv AT delorie DOT com

On Thu, 26 Sep 2002, DJ Delorie wrote:

> I would worry about IS_ conflicting with system headers.  Perhaps we
> should just put the check inline, with an explanatory comment, like
> this?
[snip]

Ok. Here the new patch.

Regards,
Guerrero, Juan M.


Index: djgpp/src/utils/djtar/untar.c
===================================================================
RCS file: /cvs/djgpp/djgpp/src/utils/djtar/untar.c,v
retrieving revision 1.6
diff -u -r1.6 untar.c
--- djgpp/src/utils/djtar/untar.c	21 Mar 2001 17:01:58 -0000	1.6
+++ djgpp/src/utils/djtar/untar.c	27 Sep 2002 08:07:58 -0000
@@ -170,6 +170,12 @@
       fprintf(log_out, "%6lo %02x %12ld %s\n",perm,header.flags[0],size,changed_name);
 #endif
 
+      if (header.flags[0] == '1' || header.flags[0] == '2')
+      {
+        /* Symbolic links always have zero data, but some broken
+           tar programs claim otherwise.  */
+        size = 0;
+      }
       if (should_be_written == 0)
       {
         skipping = (size+511) & ~511;

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019