test revert "force hash to finish with file before returning"
This reverts commit 7482853ddd
.
This seems to have caused a memory leak.
This commit is contained in:
parent
3a6039c287
commit
d1f87e8c8e
1 changed files with 2 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
- Licensed under the GNU GPL version 3 or higher.
|
- Licensed under the GNU GPL version 3 or higher.
|
||||||
-}
|
-}
|
||||||
|
|
||||||
{-# LANGUAGE BangPatterns, CPP #-}
|
{-# LANGUAGE CPP #-}
|
||||||
|
|
||||||
module Backend.Hash (
|
module Backend.Hash (
|
||||||
backends,
|
backends,
|
||||||
|
@ -170,9 +170,7 @@ hashFile hash file filesize = go hash
|
||||||
go (SHA3Hash hashsize) = use (sha3Hasher hashsize)
|
go (SHA3Hash hashsize) = use (sha3Hasher hashsize)
|
||||||
go (SkeinHash hashsize) = use (skeinHasher hashsize)
|
go (SkeinHash hashsize) = use (skeinHasher hashsize)
|
||||||
|
|
||||||
use hasher = liftIO $ do
|
use hasher = liftIO $ hasher <$> L.readFile file
|
||||||
!h <- hasher <$> L.readFile file
|
|
||||||
return h
|
|
||||||
|
|
||||||
usehasher hashsize = case shaHasher hashsize filesize of
|
usehasher hashsize = case shaHasher hashsize filesize of
|
||||||
Left sha -> use sha
|
Left sha -> use sha
|
||||||
|
|
Loading…
Add table
Reference in a new issue