This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

RE: "cygpath -w ." returns ".\" instead of "."


> -----Original Message-----
> From: cygwin-owner On Behalf Of Trevor Baker
> Sent: 01 July 2004 22:43

> the following
> trivial script:

  Even a trivial script can have bugs in it!

> #----------
> #!/bin/sh
> 
> BASEDIR=`cygpath -w .`

  So here on line one, you're asking for a windoze-format path.

> FILE="$BASEDIR/out.txt"

  And here on line two, you're concatenating a unix-style path to the
windoze-style path you previously asked for.  That looks like a bug to me.

> touch "$FILE"
> #----------
> 
> If you run this, $FILE is set to ".\/out.txt" which is not very unix
> friendly.

  WDDTT!


    cheers, 
      DaveK
-- 
Can't think of a witty .sigline today....


--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]