Mail Archives: djgpp-workers/2002/09/27/04:17:29
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 -