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: using rsync with Win32/UNC pathnames?

Eric Blake schrieb:
Hash: SHA1

According to Tomasz Chmielewski on 4/1/2008 5:59 AM:
| According to
|   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:


For such cases, one has to use UNC pathnames:


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?


Tomasz Chmielewski

Unsubscribe info:
Problem reports:

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