Mailing-List: contact cygwin-help AT sourceware DOT cygnus DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT sources DOT redhat DOT com Delivered-To: mailing list cygwin AT sources DOT redhat DOT com Message-ID: <17B78BDF120BD411B70100500422FC6309E12C@IIS000> From: Bernard Dautrevaux To: "'cygwin AT sources DOT redhat DOT com'" , Cygwin mailing list Subject: RE: Treatment of x:path again Date: Tue, 17 Oct 2000 14:44:46 +0200 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2650.21) Content-Type: text/plain; charset="iso-8859-1" > -----Original Message----- > From: Chris Faylor [mailto:cgf AT cygnus DOT com] > Sent: Monday, October 16, 2000 5:53 PM > To: Cygwin mailing list > Subject: Re: Treatment of x:path again > > > On Mon, Oct 16, 2000 at 12:26:57PM +0400, Andrej Borsenkow wrote: > >I am not sure, that this was fixed correctly. Consider: > > > >mw1g017 AT MW1G17C% ls -l d:bash.strace > >-rw-r--r-- 1 mw1g017 ITS 7828140 Oct 11 20:09 d:bash.strace > >mw1g017 AT MW1G17C% pwd > >/cygdrive/d/temp > >mw1g017 AT MW1G17C% cygpath -a -u d:bash.strace > >/cygdrive/d/bash.strace > >mw1g017 AT MW1G17C% ls -l /cygdrive/d/bash.strace > >ls: /cygdrive/d/bash.strace: No such file or directory > > > >The x:path is treated by Windows as "relative to current > directory of drive > >x". Instead, cygpath treats it as "relative to root > directory of drive x". See > >the difference? > > > >BTW windows path as reported by cygpath is also wrong: > > > >mw1g017 AT MW1G17C% cygpath -a -w d:bash.strace > >d:bash.strace > > > >This is not an absolute path. > > How would you suggest having something be 'relative to the > current path' > in cygwin, given the /cygdrive method of doing things? > cygwin has never > kept track of the current directory of other drives. > > If you'd like to submit a patch to somehow accomplish this, > I'd be happy > to apply it. In the rest of the thread there is good reasons for sticking to the current cygwin behaviour of not having per-drive current directories; however part of the problem reported here seems to have been overseen: The very first command above: > >mw1g017 AT MW1G17C% ls -l d:bash.strace > >-rw-r--r-- 1 mw1g017 ITS 7828140 Oct 11 20:09 d:bash.strace is finding d:bash.trace, while it shouldn't! > >mw1g017 AT MW1G17C% pwd > >/cygdrive/d/temp Moreover as the second command shows, we are currently on drive d:, so even if cygwin maintained a single current directory, it should be able to say, using cygpath, that d:bash.trace is /cygdrive/d/temp/bash.trace (i.e. $PWD/bash.trace). The problem here is that it seems that cygwin is not recognizing d:bash.trace as a relative path name... I don'y have too much problems with that as it will be totally non-unix-like to be able to refer to d:bash.trace if the current directory is under some other drive. However in this case we should *never* be able to access d:bash.trace and cygpath should *refuse* to translate this. Cygwin should only accept drive letters if they are followed by an absolute path and reject them otherwise; this would be a lot more consistent than the current "sometimes it works, sometimed it don't" behavior. Just my $.02 Bernard > -- > Want to unsubscribe from this list? > Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com > -------------------------------------------- Bernard Dautrevaux Microprocess Ingenierie 97 bis, rue de Colombes 92400 COURBEVOIE FRANCE Tel: +33 (0) 1 47 68 80 80 Fax: +33 (0) 1 47 88 97 85 e-mail: dautrevaux AT microprocess DOT com b DOT dautrevaux AT usa DOT net -------------------------------------------- -- Want to unsubscribe from this list? Send a message to cygwin-unsubscribe AT sourceware DOT cygnus DOT com