Path: utzoo!utgpu!water!watmath!clyde!bellcore!faline!ulysses!allegra!mit-eddie!uw-beaver!cornell!batcomputer!pyramid!prls!mips!dce From: dce@mips.UUCP Newsgroups: comp.unix.wizards Subject: Re: Tar broken on 4.3BSD? Message-ID: <1278@quacky.UUCP> Date: 11 Jan 88 16:01:37 GMT References: <11091@brl-adm.ARPA> Reply-To: dce@quacky.UUCP (David Elliott) Organization: MIPS Computer Systems, Sunnyvale, CA Lines: 35 Posted: Mon Jan 11 11:01:37 1988 In article <11091@brl-adm.ARPA> ted@braggvax.arpa writes: >While I enjoy being called a fool and a novice as well as the next guy, >and so deeply appreciate all the helpful responses from the net, the fact >remains that 4.3 tar is BROKEN. > >Now, does anyone have a fix? Try this (use patch; my line numbers will be different from yours): *** tar.c.old --- tar.c *************** *** 514,520 **** sprintf(dblock.dbuf.chksum, "%6o", checksum()); (void) writetape((char *)&dblock); } ! sprintf(newparent, "%s/%s", parent, shortname); if (chdir(shortname) < 0) { fflush(stderr); perror(shortname); --- 514,524 ---- sprintf(dblock.dbuf.chksum, "%6o", checksum()); (void) writetape((char *)&dblock); } ! if (*shortname == '/') { ! strcpy(newparent, shortname); ! } else { ! sprintf(newparent, "%s/%s", parent, shortname); ! } if (chdir(shortname) < 0) { fflush(stderr); perror(shortname); -- David Elliott dce@mips.com or {ames,prls,pyramid,decwrl}!mips!dce