aboutsummaryrefslogtreecommitdiff
path: root/Logs/Unused.hs
diff options
context:
space:
mode:
authorGravatar Joey Hess <joey@kitenet.net>2014-01-28 17:14:43 -0400
committerGravatar Joey Hess <joey@kitenet.net>2014-01-28 17:14:43 -0400
commit6c31e5704bca221aac4183366fc234a74a8eb6fc (patch)
treee0001230109e86a78ffcd309f70d00248b0feddd /Logs/Unused.hs
parent6e027dbfa6d6b25ab3daa2fad5b946b513dad1d0 (diff)
fix build with old ghc that used old-time type
Diffstat (limited to 'Logs/Unused.hs')
-rw-r--r--Logs/Unused.hs8
1 files changed, 8 insertions, 0 deletions
diff --git a/Logs/Unused.hs b/Logs/Unused.hs
index 0af319f04..c13054f3c 100644
--- a/Logs/Unused.hs
+++ b/Logs/Unused.hs
@@ -15,6 +15,8 @@
- Licensed under the GNU GPL version 3 or higher.
-}
+{-# LANGUAGE CPP #-}
+
module Logs.Unused (
UnusedMap,
updateUnusedLog,
@@ -90,9 +92,15 @@ readUnusedMap :: FilePath -> Annex UnusedMap
readUnusedMap = log2map <$$> readUnusedLog
dateUnusedLog :: FilePath -> Annex (Maybe UTCTime)
+#if MIN_VERSION_directory(1,2,0)
dateUnusedLog prefix = do
f <- fromRepo $ gitAnnexUnusedLog prefix
liftIO $ catchMaybeIO $ getModificationTime f
+#else
+#warning foo
+-- old ghc's getModificationTime returned a ClockTime
+dateUnusedLog _prefix = Nothing
+#endif
{- Set of unused keys. This is cached for speed. -}
unusedKeys :: Annex (S.Set Key)