From 618e3ae6364bbcade9d7bb657412418967ae4143 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 26 Oct 2013 14:07:49 -0400 Subject: 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 --- Remote/Helper/Chunked.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'Remote/Helper') 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 -- cgit v1.2.3