Mail Archives: djgpp-workers/2003/09/01/17:14:42
> > From: "Tim Van Holder" <tim DOT van DOT holder AT pandora DOT be>
> > Date: Mon, 1 Sep 2003 08:02:46 +0200
> >
> > > What other way is there to express "c:" with the /dev/x notation?
> >
> > Should there be one?
>
> If there's a reason to disallow it, let's hear it. If not, I'd
> generally advise to refrain from gratuitous changes.
How about simple shell sanity? Shell scripts may consider
$dir and $dir/. to be interchangeable (and I wouldn't be surprised
if POSIX mandated this), which would not necessarily be true in
our case ('c:' versus 'c:/.' if $dir is /dev/c).
> > The /dev/xxx notation is there for POSIX support
>
> No, it's for programs and shell scripts which believe that every
> absolute file name begins with a slash.
Which is the POSIX way of thinking. Same difference.
> > again, does this mean that 'cd /dev/c' ends you in
> > '/dev/c/Documents And Settings/Foo/Desktop'? If so, that's one
> > (good) reason for making /dev/c map to c:/.
> > After all, unlike Cygwin (as far as I know), we still allow
> DOS-style
> > paths, so users can still use c: if they need it.
>
> Users can do that, but we introduced /dev/x for shell scripts. What
> if a shell script does a "cd /dev/c" for some reason?
Then it will expect to be in /dev/c, not /dev/c/whatever/dir/is/current.
> I guess one important related question is what does `pwd' produce
> when the current directory is "c:/"?
c:/
bash's pwd builtin returns c:/, /dev/c, or /dev/c/ based on what you cd'd
to.
- Raw text -