The Samba-Bugzilla – Bug 3542
"rsync --list-only a b/" tries to create b
Last modified: 2006-03-12 02:56:56 UTC
Rsync's --list-only option requires a destination, which is strange because the destination isn't used for anything. Nevertheless, in get_local_name, rsync ensures that the destination is usable, which may involve trying to create the destination as a directory. Luckily, if rsync tries to create the directory, the attempt is caught in do_mkdir and an error message results, but rsync really shouldn't care about the destination at all.
The patch I will soon attach causes get_local_name to return NULL immediately if --list-only is given. However, there has to be a better way to ensure the destination is not touched in this situation.
Separately, it would be an improvement if the destination argument could be omitted when --list-only is given. (Until I read the man page, I kept trying to run "rsync --list-only source/" and wondered why I got a usage error.)
Created attachment 1753 [details]
Makes get_local_name return NULL if --list-only is given
Thanks! This is now fixed in CVS.
Also, rsync no longer returns a usage error when used with one local source arg and no destination: this now implies the --list-only option, just like the comparable situation with a remote source arg.