From: "Tim Van Holder" To: Subject: Re: /dev/c - c: or c:/ ? Date: Mon, 1 Sep 2003 22:50:41 +0200 Message-ID: <002a01c370ca$b51801e0$2202a8c0@dualzastai> MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit X-Priority: 3 (Normal) X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook, Build 10.0.4510 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165 Importance: Normal In-Reply-To: <3405-Mon01Sep2003191913+0300-eliz@elta.co.il> 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 > > From: "Tim Van Holder" > > 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.