[commit: packages/Cabal] ghc-head: Fix the 'index.cache' timestamp check. (b853a3e)

git at git.haskell.org git at git.haskell.org
Mon Aug 26 23:23:34 CEST 2013


Repository : ssh://git@git.haskell.org/Cabal

On branch  : ghc-head
Link       : http://git.haskell.org/?p=packages/Cabal.git;a=commit;h=b853a3eb8bcb562939aa86bf2cd1df3f1e8dedc1

>---------------------------------------------------------------

commit b853a3eb8bcb562939aa86bf2cd1df3f1e8dedc1
Author: Mikhail Glushenkov <the.dead.shall.rise at gmail.com>
Date:   Wed May 1 01:23:34 2013 +0200

    Fix the 'index.cache' timestamp check.
    
    Since we're using 'unless' here, we should use (>) instead of (>=).


>---------------------------------------------------------------

b853a3eb8bcb562939aa86bf2cd1df3f1e8dedc1
 cabal-install/Distribution/Client/IndexUtils.hs |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/cabal-install/Distribution/Client/IndexUtils.hs b/cabal-install/Distribution/Client/IndexUtils.hs
index ea8d777..3a57e61 100644
--- a/cabal-install/Distribution/Client/IndexUtils.hs
+++ b/cabal-install/Distribution/Client/IndexUtils.hs
@@ -240,7 +240,7 @@ whenCacheOutOfDate origFile cacheFile action = do
     else do
       origTime  <- getModificationTime origFile
       cacheTime <- getModificationTime cacheFile
-      unless (cacheTime >= origTime) action
+      unless (cacheTime > origTime) action
 
 
 ------------------------------------------------------------------------





More information about the ghc-commits mailing list