[Bug 13901] New: Empty quotes adds cwd to SRC directories

samba-bugs at samba.org samba-bugs at samba.org
Wed Apr 17 13:54:54 UTC 2019


            Bug ID: 13901
           Summary: Empty quotes adds cwd to SRC directories
           Product: rsync
           Version: 3.1.3
          Hardware: x64
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: core
          Assignee: wayne at opencoder.net
          Reporter: daniel at grundstrom.email
        QA Contact: rsync-qa at samba.org

Created attachment 15076
  --> https://bugzilla.samba.org/attachment.cgi?id=15076&action=edit
For cmd 'rsync "$UNSET_VAR" --debug=ALL5 --verbose --recursive -- /data/src/

Hi! It's my first bug report here so let me know if I should clarify anything!

If you add empty quotes to the rsync command line, it is interpreted as the
current working directory ("."), and added to the SRC args. It doesn't matter
if the quotes come before or after any options, if it comes before "--" or if
there are other source directories specified.

This is a problem if you specify quoted bash variables on the command line and
one of them happens to be unset.

/data/cwd $ ls
/data/cwd $ rsync "$UNSET_VAR" --recursive --verbose -- /data/src/ /data/dest/
sending incremental file list

sent 819,001 bytes  received 54 bytes  1,638,110.00 bytes/sec
total size is 818,581  speedup is 1.00

I have attached the output of the command with '--debug=ALL5' added, if it

You are receiving this mail because:
You are the QA Contact for the bug.

More information about the rsync mailing list