fix build with old ghc that used old-time type
This commit is contained in:
parent
97a849092c
commit
f0dfac4d96
1 changed files with 8 additions and 0 deletions
|
@ -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)
|
||||
|
|
Loading…
Reference in a new issue