🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: gnu.utils.bug
Article #1225

Small compatibility problem with "X" option in tar 1.11.1

#1225
From: Scott L. Burson
Date: Fri, 18 Dec 1992 02:01
27 lines
1223 bytes
In Unix tar, if I want to dump the current directory minus file `foo',
I might say

   tar cX excludes .

where the file `excludes' contains

   ./foo

Note that "./" must be prepended to the name.

This `excludes' file doesn't work, however, with GNU tar, because GNU tar
strips "./" from the filenames as it's dumping them (see line 763 of
`create.c').  To allow the old `excludes' file to be used unmodified, I have
made the following change near the end of `add_exclude' in `tar.c':

/* beginning of insertion */
	   if (name[0] == '.'  &&  name[1] == '/') name += 2;
/* end of insertion */
	   strcpy(x_buffer+size_x_buffer,name);
	   size_x_buffer+=size_buf+1;
	   free_x_buffer-=size_buf+1;
   }

You might want to include this change in your next release.

-- Scott
Technical Details
Message-ID: <9212180201.AA03472@ganesh.zeta-soft.com>
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zeta-soft.COM!gyro

Show Full Headers
Complete Article Headers
Newsgroups: gnu.utils.bug
Path: arc1-ca.pugleaf.net!sparky!uunet!cis.ohio-state.edu!zeta-soft.COM!gyro
From: gyro@zeta-soft.COM (Scott L. Burson)
Subject: Small compatibility problem with "X" option in tar 1.11.1
Message-ID: <9212180201.AA03472@ganesh.zeta-soft.com>
Sender: gnulists@ai.mit.edu
Organization: GNUs Not Usenet
Distribution: gnu
Date: Fri, 18 Dec 1992 02:01:43 GMT
Approved: bug-gnu-utils@prep.ai.mit.edu
Lines: 28