Problem with null source argument

josephj at main.nc.us josephj at main.nc.us
Wed Mar 21 01:08:45 MDT 2012


I'm writing an rsync backup script in bash on kubuntu oneiric.

While debugging my script, I accidentally invoked rsync with a first
null/empty argument as

rsync "" options source dest

I did not get any error messages.  rsync worked as advertised, but it also
transferred everything in my working directory to the destination.

I posted a question about this on stackexchange and another user verified
this behaviour.

This was very unexpected behaviour and was difficult to catch because ""
is relatively invisible.

Shouldn't this "" have either been ignored or generated a syntax or
run-time error?

Since rsync takes multiple arguments for source directories, it still
found the "real" source and processed it, but it seems to have interpreted
"" as my current working directory.

This looks like a bug.

Is this something I should file a bug report for?

TIA

Joe



More information about the rsync mailing list