Skip to content

Commit 4b79220

Browse files
committed
s3: Fix chunkFilesBySize function
The property test was failing occasionally and wasn't caught before now.
1 parent c0cb6eb commit 4b79220

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

mismi-s3/src/Mismi/S3/Commands.hs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -515,7 +515,7 @@ chunkFilesBySize maxCount maxSize =
515515
takeFiles current acc ((x, s):xs) =
516516
if current + s < maxSize && L.length acc < maxCount
517517
then takeFiles (current + s) ((x, s):acc) xs
518-
else ((x, s):acc) : takeFiles 0 [] xs
518+
else acc : takeFiles s [(x, s)] xs
519519

520520
-- | Like `listRecursively` but for the local filesystem.
521521
-- Also returns

0 commit comments

Comments
 (0)