Rsync hard-links devices with different mtimes despite -t: expected?

Wayne Davison wayned at
Sat Nov 3 21:19:04 GMT 2007

On Tue, Oct 30, 2007 at 05:20:30PM -0400, Matt McCutchen wrote:
> I noticed that rsync is happy to hard-link a device node from a
> --link-dest dir even if its mtime differs from that of the source
> device node and --times is given.  Is this behavior expected?

Not really.  It doesn't hurt anything with devices, but we should obey
the general rule only linking things don't differ in attributes that we
are preserving.  The code in unchanged_attrs() was expecting that the
mtime would have been compared in the unchanged_file() routine, but
that assumption is not true for some of the code paths that ended up
using the routine.

The latest CVS makes unchanged_attrs() ensure that the mtime is the


More information about the rsync mailing list