Source directory without a trailing slash

David Schoen dave at
Thu Apr 29 03:02:45 MDT 2010

On 29 April 2010 10:06, Matt McCutchen <matt at> wrote:

> On Wed, 2010-04-28 at 22:24 +1000, David Schoen wrote:
> > Also when I use rsync I like to put slashes on the end of all paths as
> > it works closer to the way you're thinking, e.g.:
> > rsync -av /path/to/source/directory/ /path/to/destination/directory/
> >
> > other wise you will probably end up with two copies after your second
> > run, one in /path/to/destination/directory and the second in
> > /path/to/destination/directory/directory . Which probably isn't what
> > you want.
> I believe the behavior you describe is a bug.  "rsync src dest" should
> always copy to dest/src .  However, if dest does not exist yet /and/ src
> happens to be empty, "solo file" mode will trip and the source path will
> be ignored.  This is a pointless inconsistency.  I think an empty
> directory should not be regarded as a solo file.  In commit a7d461f,
> Wayne changed a comment in get_local_name to suggest that but apparently
> did not change the code to match.

You're right, it does. Either I have a faulty memory or at some point I've
used a buggy version. Thanks for pointing this out :)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the rsync mailing list