Mail Archives: djgpp-workers/2001/06/09/13:25:28
> From: Martin Str|mberg <ams AT ludd DOT luth DOT se>
> Date: Sat, 9 Jun 2001 18:47:27 +0200 (MEST)
>
> According to Eli Zaretskii:
> > > Because there's a readonly attribute. If you want a file readonly you
> > > set this attribute not the SYSTEM or HIDDEN bits.
> >
> > So you are saying that a file with a HIDDEN or SYSTEM attribute set
>
> Those usually do have the readonly bit set too
Not always. Look in the C:\windows directory on any Windows system,
and you will see quite a few files and directories that are hidden or
system, but not readonly.
> > should look to a user of "ls -l" as a normal file? How would that
> > user then guess the reason for the strange behavior she observes when
> > DOS commands and functions are invoked on those files?
>
> Well, if he uses DOZE commands he's not using ls...
We are not talking about `ls' alone, we are talking about `stat'.
"ls -l" doesn't do anything special with these attribute bits, it
simply shows the mode bits returned by `stat'.
The issue is how, if at all, should `stat' tell its caller that some
files have hidden/system attribute bits set.
> > Could you please explain what exactly is wrong with that? Why did it
> > annoy you that .cvsignore was shown as not writable?
>
> 1. As I said, it's a lie. The readonly bit isn't set so the file isn't
> readonly.
I agree that the mapping isn't ideal. I just don't see a better
mapping, and ignoring those bits surely doesn't seem a good
alternative.
> 2. Why it annoys me immensly is that I routinely do "cp -a
> v:/my/cvs/tree/of/djgpp/src/* /djgpp/src.compiling/" while
> developing. And now I get a ton of warnings from cp because the copy
> made the previous run of cp is set to readonly.
When you copy directory trees, you should use "cp -rf". Otherwise,
every write-protected file will trigger a prompt.
- Raw text -