diff options
author | Joey Hess <joey@kitenet.net> | 2013-10-26 14:07:49 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-10-26 14:08:29 -0400 |
commit | 618e3ae6364bbcade9d7bb657412418967ae4143 (patch) | |
tree | efec5479bc8a482ddcd12d5aae6049dea583d7c6 | |
parent | c6c6c79443b57f4ed1cfc70cdaf4e22e40269b8f (diff) |
fix inverted logic when determining whether to write a chunkcount file
late-night hlint bit me on this one..
Reviewed f32cb2cf1576db1395f77bd5f7f0c0a3e86c1334 and
the rest of it seems ok
-rw-r--r-- | Remote/Helper/Chunked.hs | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Remote/Helper/Chunked.hs b/Remote/Helper/Chunked.hs index c4cec37ea..fcaa6b003 100644 --- a/Remote/Helper/Chunked.hs +++ b/Remote/Helper/Chunked.hs @@ -58,7 +58,7 @@ chunkStream = map (\n -> ".chunk" ++ show n) [1 :: Integer ..] - generates a stream of temporary destinations (just one when not chunking) - and passes it to an action, which should chunk and store the data, - and return the destinations it stored to, or [] on error. Then - - calls the storer to write the chunk count (if chunking). Finally, the + - calls the recorder to write the chunk count (if chunking). Finally, the - finalizer is called to rename the tmp into the dest - (and do any other cleanup). -} @@ -68,7 +68,7 @@ storeChunks key tmp dest chunksize storer recorder finalizer = either onerr retu where go = do stored <- storer tmpdests - when (isNothing chunksize) $ do + when (isJust chunksize) $ do let chunkcount = basef ++ chunkCount recorder chunkcount (show $ length stored) finalizer tmp dest |