diff options
author | Joey Hess <joey@kitenet.net> | 2010-10-10 02:22:35 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2010-10-10 02:22:35 -0400 |
commit | 60c672e444decf59c20beb70b89f030ad9d62b3e (patch) | |
tree | 8f93a02a6d3e343c06176f6b98635d6346e6ede2 /LocationLog.hs | |
parent | c67521741abd9a49ebf43d6c649fe0356fa68fb3 (diff) |
strictness and handle closing
Diffstat (limited to 'LocationLog.hs')
-rw-r--r-- | LocationLog.hs | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/LocationLog.hs b/LocationLog.hs index db1fac144..c921a2005 100644 --- a/LocationLog.hs +++ b/LocationLog.hs @@ -12,7 +12,6 @@ - - A line of the log will look like: "date N reponame" - Where N=1 when the repo has the file, and 0 otherwise. - - -} module LocationLog where @@ -69,8 +68,8 @@ readLog file = do if exists then do h <- openLocked file ReadMode - s <- hGetContents h - -- hClose handle' -- TODO disabled due to lazy IO issue + s <- hGetContentsStrict h + hClose h -- filter out any unparsable lines return $ filter (\l -> (status l) /= Undefined ) $ map read $ lines s @@ -95,7 +94,7 @@ logNow status repo = do logFile :: String -> IO String logFile annexedFile = do repo <- repoTop - return $ repo ++ "/.git-annex/" ++ + return $ (gitStateDir repo) ++ (gitRelative repo annexedFile) ++ ".log" {- Returns a list of repositories that, according to the log, have |