DO NOT REPLY [Bug 4870] --link-dest results in errors for some paths containing spaces

samba-bugs at samba-bugs at
Sun Oct 14 21:39:15 GMT 2007

wayned at changed:

           What    |Removed                     |Added
             Status|NEW                         |RESOLVED
         Resolution|                            |INVALID

------- Comment #1 from wayned at  2007-10-14 16:39 CST -------
In the example you provided, you did not escape the space in the arg that you
passed to rsync, so that is an error on your part.  You'll need to either put
the arg into quotes, or use a backslash to escape the space.  For a daemon
transfer, that will cause the copy to work fine (though in your cited command
you are only requesting a file listing, since there is no destination

For a non-daemon transfer, rsync does not try to escape spaces in command-line
args that it sends to the server process.  This can lead to a space-splitting
problem with the --link-dest arg if the client is the sender.  In 3.0.0 there
is now a --protect-args (-s) option that sends the majority of the command-line
args across the socket connection, which avoids this space splitting.

I don't wish to add any other space-escaping features to the arg passing, as
the type of escaping used depends on what shell is used on the remote system. 
I consider the use -s to be the right solution going forward, and the -s option
will eventually become the default (when enough time has passed to make 3.0.0
or later the rule rather than the exception).

Configure bugmail:
------- You are receiving this mail because: -------
You are the QA contact for the bug, or are watching the QA contact.

More information about the rsync mailing list