This is the mail archive of the
mailing list for the Cygwin project.
Re: get cygpath to leave relative paths as relative?
- From: Igor Peshansky <pechtcha at cs dot nyu dot edu>
- To: Brent <yhbrent at yahoo dot com>
- Cc: cygwin at cygwin dot com
- Date: Tue, 11 Dec 2007 10:38:07 -0500 (EST)
- Subject: Re: get cygpath to leave relative paths as relative?
- References: <email@example.com>
- Reply-to: cygwin at cygwin dot com
On Mon, 10 Dec 2007, Brent wrote:
> If I execute
> mypath=`cygpath -w ../`
> echo $mypath
> I get
> OK, d:\unix\nextVersion\script is the correct windows version of the
> path, but it is in absolute form. I would prefer it if cygpath left it
> in relative form, i.e.
> echo $mypath
> should output
> cygpath --help
> indicates that the only related option is -a, but that forces conversion
> to absolute paths, which is the opposite of what I want. It seems,
> unfortunately, as if cygpath has -a on by default and has no way to turn
> it off!
> Is this a known bug or implementation quirk in cygpath, or did I
> overlook something? (Web searching on cygpath and "relative path"
> generated a ton of hits, but none out of the first 100 that I looked
> thru seemed related...)
In addition to what Corinna said, if you don't have any symlinks in the
relative path, you should be able to use the forward slash variant without
using cygpath. All Windows system calls (and most Windows programs)
understand forward slashes just fine.
|\ _,,,---,,_ firstname.lastname@example.org | email@example.com
ZZZzz /,`.-'`' -. ;-;;,_ Igor Peshansky, Ph.D. (name changed!)
|,4- ) )-,_. ,\ ( `'-' old name: Igor Pechtchanski
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"That which is hateful to you, do not do to your neighbor. That is the whole
Torah; the rest is commentary. Go and study it." -- Rabbi Hillel
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Problem reports: http://cygwin.com/problems.html