[Bug 10857] weirdly named files fail remotely

Linda A. Walsh rsync at tlinx.org
Sun Oct 12 21:09:27 MDT 2014


samba-bugs at samba.org wrote:
> https://bugzilla.samba.org/show_bug.cgi?id=10857
>
> --- Comment #4 from samba.org at tange.dk <samba.org at tange.dk> ---
> Can we start by agreeing that rsync _could_ be aware that it is starting a
> remote shell and thus _could_ quote anything that needed quoting?
>   
---
    No.  Quotes might be part of a filename on a remote system.
> Currently it clearly does not quote and puts that responsibility on the user.
>   
It has to... only the user knows the context...
> My question is: Why put that responsibility on the user? Why not help the user?
> Rsync knows in advance that files with weird characters will cause problems, so
> why not help the user by quoting them correctly?
>   
-----
    What's a "weird" character?  What you may not realizing is that
the first level of quotes you type in on a command line are removed
by the shell -- rsync never sees them. 

    So 1) how can rsync differentiate between user quotes and
quotes in file names?

    2) different shells quote differently (cmd.com on WINDOWS, vs
bash or csh on *nix....)

    If you put your filenames into a file, and use
--files-from=FILE (FILE being where you list your files -- then
you shouldn't need any quotes.

Will that work in this situation?





More information about the rsync mailing list