diff options
author | Joey Hess <joey@kitenet.net> | 2012-11-19 13:30:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-11-19 13:30:58 -0400 |
commit | af4886c315f908eb3c59982360fafcc9cdd3ae29 (patch) | |
tree | 41607ede808676a57115d37c99273a29c28ffe0c | |
parent | 798c3d45c11cfe3d7604b27f3271f50d0f810db7 (diff) |
Bugfix: directory special remote could loop forever storing a key when a too small chunksize was configured.
Ensure that each file has something written to it, even if the bytestring
chunk size is greater than the configured chunksize.
This means we may write a bit larger than the configured value, but only
when the configured value is very small; ie, < 8 kb.
-rw-r--r-- | Remote/Directory.hs | 2 | ||||
-rw-r--r-- | debian/changelog | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/Remote/Directory.hs b/Remote/Directory.hs index f166c2a0d..737ae6312 100644 --- a/Remote/Directory.hs +++ b/Remote/Directory.hs @@ -158,7 +158,7 @@ storeSplit' meterupdate chunksize (d:dests) bs c = do feed _ [] _ = return [] feed sz (l:ls) h = do let s = fromIntegral $ S.length l - if s <= sz + if s <= sz || sz == chunksize then do S.hPut h l meterupdate $ toInteger s diff --git a/debian/changelog b/debian/changelog index da7896b4c..c9488014e 100644 --- a/debian/changelog +++ b/debian/changelog @@ -11,6 +11,8 @@ git-annex (3.20121113) UNRELEASED; urgency=low it all in memory. * S3: Added progress display for uploading and downloading. * directory special remote: Made more efficient and robust. + * Bugfix: directory special remote could loop forever storing a key + when a too small chunksize was configured. -- Joey Hess <joeyh@debian.org> Tue, 13 Nov 2012 13:17:07 -0400 |