Date: Tue, 13 Feb 2001 21:55:39 +0200 From: "Eli Zaretskii" Sender: halo1 AT zahav DOT net DOT il To: lauras AT softhome DOT net Message-Id: <9003-Tue13Feb2001215538+0200-eliz@is.elta.co.il> X-Mailer: Emacs 20.6 (via feedmail 8.3.emacs20_6 I) and Blat ver 1.8.6 CC: djgpp-workers AT delorie DOT com In-reply-to: <20010213155608.236.qmail@lauras.lt> Subject: Re: PATCH: new djtar option References: <20010212200601 DOT 786 DOT qmail AT lauras DOT lt> <20010213155608 DOT 236 DOT qmail AT lauras DOT lt> 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 Precedence: bulk > From: "Laurynas Biveinis" > Date: Tue, 13 Feb 2001 17:56:08 +0200 > > > Also, at least for skipping directories, you could use the same data > > structure used by djtar for mapping file names: there's already a > > provision there to skip files and directories. It would make the code > > less complicated. > > But hash tables deal with full filenames only; I put a prefix > 'gcc-3.0/libjava' in it, but 'gcc-3.0/libjava/foo' generates a different > hash code, and the match isn't detected. Look at the function djtar.c:change -- if the isdir member of the struct has the value of 2, all the files under that directory are skipped. The problem is it currently calls that function only under certain conditions. If you change those conditions, or duplicate the code, all the pieces will fall in place.