Problem retrieving file starting with '-' character from top of repository

Wayne Davison wayned at samba.org
Wed Dec 22 10:08:34 MST 2010


On Wed, Dec 22, 2010 at 1:53 AM, Tim Bruijnzeels <tim at ripe.net> wrote:

> There seems to be a problem when trying to retrieve a file that starts with
> a '-' character, if it lives in the top of an rsync repository:
>

If the file gets requested by name on the command-line, then popt will
interpret it as an option, which will cause a problem.  I don't see how the
daemon protocol you cited could fail, though, since it always sends the file
names over the daemon protocol. For a non-daemon file request, the issue can
be avoided by requesting the name with a dot-slash at the start (or using
--protect-args in newer rsync versions).  For instance:

  rsync -aiv localhost:./-fails /dest/

..wayne..
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.samba.org/pipermail/rsync/attachments/20101222/eed778ad/attachment.html>


More information about the rsync mailing list