Bug#305932: rsync on a directory transfers the files of this directory

Wayne Davison wayned at samba.org
Thu May 19 09:35:05 GMT 2005


On Thu, May 19, 2005 at 11:04:23AM +0200, Paul Slootman wrote:
> --files-from transferring the contents of a dir (i.e. including the
> files in it) specified in the input, even though the files aren't
> listed in the input.

That's as intended, since a trailing slash means "the contents of the
directory".  This is not unique to --files-from, but also happens when
-d is specified and a directory on the command-line has a trailing slash
(obviously -r must not be specified, or even deeper files would also be
copied, not just the directory's immediate contents).  The behavior was
first introduced in 2.6.4 when --dirs (-d) was added.  The man page
mentions this behavior of a trailing slash in the --dirs section, and it
mentions that --files-from implies --dirs.  Unfortunately, the NEWS file
for 2.6.4 didn't spell this out as a compatibility issue.

..wayne..


More information about the rsync mailing list