Date: Mon, 11 Jun 2001 11:25:18 +0300 (IDT) From: Eli Zaretskii X-Sender: eliz AT is To: Richard Dawe cc: djgpp-workers AT delorie DOT com Subject: Re: .files on servers are perceived as readonly In-Reply-To: <3B23E1B4.3884E3BA@phekda.freeserve.co.uk> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII 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 On Sun, 10 Jun 2001, Richard Dawe wrote: > Eli Zaretskii wrote: > > Btw, Richard: there seems to be a bug in Fileutils: they do find > > hidden and system files even without the -a flag. The original port > > of Fileutils 3.16 built with v2.01 did TRT, IIRC. > > > > It seems like the problem is that the original ported code assumed > > that `readdir' skips hidden files, and it took care to set the > > __OPENDIR_FIND_HIDDEN flag when the user options required that. > > However, beginning with v2.02, `readdir' finds hidden files by > > default, so Fileutils should now set the __OPENDIR_NO_HIDDEN flag at > > startup. > > Thanks for the bug report. I'll fix that at the weekend when I'm Fileutils > bug bashing. > > BTW Fileutils 3.16 is probably bitten by this bug now too. The source for > the 3.16 port appears to set the opendir flags in the same way. The latest port of 3.16 was simply a recompile of the original sources with minimal changes, and the original sources were for DJGPP 2.01 where __OPENDIR_FIND_HIDDEN was not on by default. I failed to ask Juan, who rebuilt Fileutils with v2.03, to change this to work with the new library (simply because I forgot about this subtlety). So the latest binaries of v3.16 indeed have the same bug; the v2.01-compiled binaries did not. Btw, the solution I suggested (see above) is not entirely correct: you indeed need to set __OPENDIR_NO_HIDDEN at startup, but instead of setting __OPENDIR_FIND_HIDDEN when you want the hidden files, you need to *reset* the __OPENDIR_NO_HIDDEN flag. (That setting __OPENDIR_FIND_HIDDEN will not work is actually a subtle bug in readdir, which I will fix in the CVS.)