Mail Archives: cygwin/2003/06/04/13:06:52
On Wed, 4 Jun 2003, Lapo Luchini wrote:
> (cc to cygwin AT cygwin DOT com so that people that knows ebtter what i'm
> talking about can eventually correct me)
> jw schultz wrote:
>
> >Perhaps that is the document he needs. If not could you
> >cygwinese, cygwinites, cygwinists, cygwinim or whatever
> >point him to one that will clear up the slash/backslash
> >issues that still haven't been addressed. Rsync does not
> >recognise backslashes as such in exclude patterns. Path
> >components are expected to be delimited by slashes ("/")
> >only. I expect the cygwin library translates as necessary.
> >
> Basically if you want to be sure about what you mean you better never
> use "\".
>
> I think the "actual state" is: cygwin's open() tries to do its best to
> open also "path with \" but most of the times there are 'problems' (that
> are, of course, no 'problems' but its meant that way) in the code of the
> app. itself that "block \" thinking they are "shell escapes" or anyway
> invalid paths... so that only a few application can be really used with
> "windows paths".
> Avoiding them completely is the safest choiche.
>
> Please notice that there is a default prgoramm called "cygpath" that's
> really useful to convert path- and file-names between the two version,
> and it's not so hard to create "wrapper scripts" to convert them, e.g.
> (I copied this long ago from I-don't-remember-where):
>
> http://cygwin.com/cygwin-ug-net/using-utils.html#CYGPATH
>
> NEWARGS=""
> for arg in $@ ;
> do
> if [ -e "${arg}" ]; then
> NEWARGS="${NEWARGS} `cygpath -p -w "$arg"`"
> else
> NEWARGS="${NEWARGS} $arg"
> fi
> done
Lapo,
Note that the above won't work correctly if the program is expected to
create the file with a given name... IMO, there is no way of writing a
generic wrapper script without knowing anything about program parameters.
Igor
--
http://cs.nyu.edu/~pechtcha/
|\ _,,,---,,_ pechtcha AT cs DOT nyu DOT edu
ZZZzz /,`.-'`' -. ;-;;,_ igor AT watson DOT ibm DOT com
|,4- ) )-,_. ,\ ( `'-' Igor Pechtchanski, Ph.D.
'---''(_/--' `-'\_) fL a.k.a JaguaR-R-R-r-r-r-.-.-. Meow!
"I have since come to realize that being between your mentor and his route
to the bathroom is a major career booster." -- Patrick Naughton
--
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/
- Raw text -