delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2003/06/04/09:35:56

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-ID: <3EDDF586.4040603@lapo.it>
Date: Wed, 04 Jun 2003 15:35:02 +0200
From: Lapo Luchini <lapo AT lapo DOT it>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.4b) Gecko/20030526
X-Accept-Language: it, en, fr, es
MIME-Version: 1.0
To: rsync AT lists DOT samba DOT org
CC: Mailing List: CygWin <cygwin AT cygwin DOT com>
Subject: rsync and cygwin paths
References: <003301c32a30$8ba04880$a905a8c0 AT backcomp> <2351466720.1054674258@[10.28.129.103]> <001901c32a36$ef387100$a905a8c0 AT backcomp> <3EDD4F3A DOT 6050506 AT Hipp DOT com> <2359963317.1054682754@[10.28.129.103]> <3EDDB2CA DOT 9050601 AT lapo DOT it> <20030604091655 DOT GJ12649 AT pegasys DOT ws>
In-Reply-To: <20030604091655.GJ12649@pegasys.ws>

(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 'Raist' Luchini
lapo AT lapo DOT it (PGP & X.509 keys available)
http://www.lapo.it (ICQ UIN: 529796)



--
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 -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019