Mail Archives: djgpp-workers/2001/06/11/04:25:09
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.)
- Raw text -