From 8f29f17005f427f8c671656e90ba1610862313fb Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Wed, 25 Sep 2013 16:07:11 -0400 Subject: add, import, assistant: Better preserve the mtime of symlinks, when when adding content that gets deduplicated. Note that this turned out to remove a syscall, not add any expense. Otherwise, I would not have done it. --- Utility/InodeCache.hs | 3 +++ 1 file changed, 3 insertions(+) (limited to 'Utility') diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs index 8037c61c8..46ca87bd9 100644 --- a/Utility/InodeCache.hs +++ b/Utility/InodeCache.hs @@ -49,6 +49,9 @@ instance Eq InodeCacheKey where inodeCacheToKey :: InodeComparisonType -> InodeCache -> InodeCacheKey inodeCacheToKey ct (InodeCache prim) = InodeCacheKey ct prim +inodeCacheToMtime :: InodeCache -> EpochTime +inodeCacheToMtime (InodeCache (InodeCachePrim _ _ mtime)) = mtime + showInodeCache :: InodeCache -> String showInodeCache (InodeCache (InodeCachePrim inode size mtime)) = unwords [ show inode -- cgit v1.2.3