]> arthur.barton.de Git - bup.git/commitdiff
Don't include atime when determining hardlink compatibility.
authorRob Browning <rlb@defaultvalue.org>
Tue, 5 Nov 2013 23:17:45 +0000 (17:17 -0600)
committerRob Browning <rlb@defaultvalue.org>
Wed, 6 Nov 2013 17:04:07 +0000 (11:04 -0600)
Don't include the atimes since we're comparing two paths stat()ed at
different times, and depending on the
platform/filesystem/mount-options, that may result in two different
atimes, even when the paths refer to the same file.

Thanks to Alexander Barton <alex@barton.de> for tracking down the
problem.

Signed-off-by: Rob Browning <rlb@defaultvalue.org>
Reviewed-by: Gabriel Filion <gabster@lelutin.ca>
cmd/restore-cmd.py
lib/bup/metadata.py

index 9c5d941a4bcf4099479ecd9f36c7de969e2cd4e1..c18945bfc38ae4a4c30a2ebb35a241dbdb632a81 100755 (executable)
@@ -79,7 +79,6 @@ def hardlink_compatible(target_path, target_vfs_path, target_meta,
         return False
     target_node = top.lresolve(target_vfs_path)
     if src_node.mode != target_node.mode \
-            or src_node.atime != target_node.atime \
             or src_node.mtime != target_node.mtime \
             or src_node.ctime != target_node.ctime \
             or src_node.hash != target_node.hash:
index 1f629c6174f77d45d9c465419ff2f7e15edffc1b..5be127944c3735725b4254210c7327b306a782c3 100644 (file)
@@ -224,7 +224,6 @@ class Metadata:
         return self.uid == other.uid \
             and self.gid == other.gid \
             and self.rdev == other.rdev \
-            and self.atime == other.atime \
             and self.mtime == other.mtime \
             and self.ctime == other.ctime \
             and self.user == other.user \