summaryrefslogtreecommitdiff
path: root/Backend
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2016-02-26 13:30:38 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2016-02-26 13:30:38 -0400
commit4e9db39ff7a71691289d4ff180d8eb897928c154 (patch)
tree7f829cb9e61337b9ec9f3b249595b0a5a920b502 /Backend
parentef7d0362310aab5f102c72ad78ad15e4b0085268 (diff)
test revert "force hash to finish with file before returning"
This reverts commit d11b032bd86ebe69f1d08e382bd83370db8ea9b9. This seems to have caused a memory leak.
Diffstat (limited to 'Backend')
-rw-r--r--Backend/Hash.hs6
1 files changed, 2 insertions, 4 deletions
diff --git a/Backend/Hash.hs b/Backend/Hash.hs
index 363467a2a..ee370f5b1 100644
--- a/Backend/Hash.hs
+++ b/Backend/Hash.hs
@@ -5,7 +5,7 @@
- Licensed under the GNU GPL version 3 or higher.
-}
-{-# LANGUAGE BangPatterns, CPP #-}
+{-# LANGUAGE CPP #-}
module Backend.Hash (
backends,
@@ -170,9 +170,7 @@ hashFile hash file filesize = go hash
go (SHA3Hash hashsize) = use (sha3Hasher hashsize)
go (SkeinHash hashsize) = use (skeinHasher hashsize)
- use hasher = liftIO $ do
- !h <- hasher <$> L.readFile file
- return h
+ use hasher = liftIO $ hasher <$> L.readFile file
usehasher hashsize = case shaHasher hashsize filesize of
Left sha -> use sha