From ff5e91840c92fbb3af70731ede8696114dfee7aa Mon Sep 17 00:00:00 2001 From: Rob Browning Date: Tue, 5 Nov 2013 17:17:45 -0600 Subject: [PATCH] Don't include atime when determining hardlink compatibility. 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 for tracking down the problem. Signed-off-by: Rob Browning Reviewed-by: Gabriel Filion --- cmd/restore-cmd.py | 1 - lib/bup/metadata.py | 1 - 2 files changed, 2 deletions(-) diff --git a/cmd/restore-cmd.py b/cmd/restore-cmd.py index 9c5d941..c18945b 100755 --- a/cmd/restore-cmd.py +++ b/cmd/restore-cmd.py @@ -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: diff --git a/lib/bup/metadata.py b/lib/bup/metadata.py index 1f629c6..5be1279 100644 --- a/lib/bup/metadata.py +++ b/lib/bup/metadata.py @@ -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 \ -- 2.39.2