delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2008/04/01/07:16:37

X-Recipient: archive-cygwin AT delorie DOT com
X-Spam-Check-By: sourceware.org
Message-ID: <47F2276F.7080405@wpkg.org>
Date: Tue, 01 Apr 2008 14:15:43 +0200
From: Tomasz Chmielewski <mangoo AT wpkg DOT org>
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.8.0.8) Gecko/20061110 Mandriva/1.5.0.8-1mdv2007.1 (2007.1) Thunderbird/1.5.0.8 Mnenhy/0.7.4.666
MIME-Version: 1.0
To: Eric Blake <ebb9 AT byu DOT net>
Cc: cygwin AT cygwin DOT com
Subject: Re: using rsync with Win32/UNC pathnames?
References: <47F223A5 DOT 5010103 AT wpkg DOT org> <47F22572 DOT 3030406 AT byu DOT net>
In-Reply-To: <47F22572.3030406@byu.net>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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

Eric Blake schrieb:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> According to Tomasz Chmielewski on 4/1/2008 5:59 AM:
> | According to http://www.cygwin.com/cygwin-ug-net/using.html:
> |
> |   Cygwin supports both Win32- and POSIX-style paths, where directory
> |   delimiters may be either forward or back slashes. UNC pathnames
> |   (starting with two slashes and a network name) are also supported.
> 
> Cygwin1.dll does.  But that doesn't mean all cygwin apps do.
> 
> | It works fine with cygwin paths:
> |
> | $ rsync -v /cygdrive/c/1 /cygdrive/c/2
> 
> Then use that.  POSIX paths are the preferred way to specify files, and if
> a backslash-path doesn't work, we aren't going to bend over backwards to
> make it "work".

I'd love to, but there are murky places in the Windows world where no 
one is able to read or write, unless UNC paths are used [1].

In Windows, path can have only up to 260 characters. Generally, it is 
not possible to create longer pathnames. Why "generally"?
Because sometimes, it is possible to create longer pathnames (i.e., when 
accessing local files from a remote mount). In this case, a local 
process won't be able to access a file called:

C:\path\longer\than\260\characters

For such cases, one has to use UNC pathnames:

\\?\C:\path\longer\than\260\characters


And this is why I can't use /cygdrive/c/path/longer/than/260/characters, 
because it "expands" to Win32-style path (which has a 260 character 
limitation) rather than to UNC-style path.

In other words: rsync will be unable to backup certain user files.


> |
> | Why does it fail with Win32-paths?
> 
> In the case of rsync (and also tar), the program has a special and
> documented syntax of remote-name:file, so you are asking to find the
> remote machine named "C" and the file "\1" on that machine, rather than
> the file "1" on the local drive c.

That's really bad.
Any ideas how to work this around?


[1] http://msdn2.microsoft.com/en-us/library/aa365247.aspx



-- 
Tomasz Chmielewski
http://wpkg.org

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