Mail Archives: djgpp-workers/2001/06/09/13:43:02
> From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> Date: Sat, 9 Jun 2001 18:58:50 +0200
>
> > > > Could you please explain what exactly is wrong with that? Why did it
> > > > annoy you that .cvsignore was shown as not writable?
> > > Because it's a writable file.
> >
> > Not really:
> >
> > D:\usr\djgpp\data>touch foobarh
> >
> > D:\usr\djgpp\data>attrib +H foobarh
> >
> > D:\usr\djgpp\data>del foobarh
> > File not found
>
> The key point here is that's it ENOFILE, and not EACCESS that is reported.
Yes, I know. But it is impossible to drag this effect into the Posix
world. Resetting the write bit was a compromise.
> So I'd expect the same behaviour as on DOS: hidden files should not be
> seen in directory walks by default (as is the case now), and destructive
> commands such as rm should by default pretend not to find them.
Unfortunately, I don't know how to do that without breaking lots of
programs. The original version of readdir was coded by DJ to skip
hidden files, but that proved to be a pest: literally every ported
program needed to work around that by setting the DJGPP-specific flag
that forced hidden files to be returned as well. For example, if
readdir doesn't return hidden files, you cannot remove directories
with such files with "rm -r".
So we changed that in v2.02 to not skip hidden files by default.
> Perhaps for hidden files, you could mask out the group & others bits (i.e.
> return 0600 instead of 0666).
This will not do what you want: as long as the user has write access
to the file, many programs won't do anything special with it. For
example, `rm' won't ask you whether to remove it.
- Raw text -