diff --git a/CHANGELOG b/CHANGELOG index da2dd56655..d35903a7a1 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -7,6 +7,8 @@ git-annex (7.20191025) UNRELEASED; urgency=medium some things involving export and import remotes, and git-annex smudge. * Improved serialization of filenames and keys to the sqlite databases, avoiding some encoding problems. + * Windows: Fix handling of changes to time zone. (Used to work but was + broken in version 7.20181031.) -- Joey Hess Tue, 29 Oct 2019 15:13:03 -0400 diff --git a/Utility/InodeCache.hs b/Utility/InodeCache.hs index 3ddee5fa03..7b46022dea 100644 --- a/Utility/InodeCache.hs +++ b/Utility/InodeCache.hs @@ -190,16 +190,14 @@ genInodeCache f delta = catchDefaultIO Nothing $ toInodeCache :: TSDelta -> FilePath -> FileStatus -> IO (Maybe InodeCache) toInodeCache (TSDelta getdelta) f s | isRegularFile s = do -#ifndef mingw32_HOST_OS delta <- getdelta -#endif sz <- getFileSize' f s #ifdef mingw32_HOST_OS - mtime <- MTimeHighRes . utcTimeToPOSIXSeconds <$> getModificationTime f + mtime <- utcTimeToPOSIXSeconds <$> getModificationTime f #else - let mtime = (MTimeHighRes (modificationTimeHiRes s + highResTime delta)) + let mtime = modificationTimeHiRes s #endif - return $ Just $ InodeCache $ InodeCachePrim (fileID s) sz mtime + return $ Just $ InodeCache $ InodeCachePrim (fileID s) sz (MTimeHighRes (mtime + highResTime delta)) | otherwise = pure Nothing {- Some filesystem get new random inodes each time they are mounted.