diff options
author | Joey Hess <joey@kitenet.net> | 2014-08-02 15:51:58 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-08-02 15:51:58 -0400 |
commit | 81b339034e8871f211ede2cf3bdb7319ad16caed (patch) | |
tree | 8fe89688fc4c224958bb822c9dcbd2cf434c8a4b /Types | |
parent | 0ddf8152ce1353bbbcd7c87c3f67063b4aed892b (diff) |
S3: support chunking
The assistant defaults to 1MiB chunk size for new S3 special remotes.
Which will work around a couple of bugs:
http://git-annex.branchable.com/bugs/S3_memory_leaks/
http://git-annex.branchable.com/bugs/S3_upload_not_using_multipart/
Diffstat (limited to 'Types')
-rw-r--r-- | Types/Key.hs | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/Types/Key.hs b/Types/Key.hs index 154e813ff..5bb41e15f 100644 --- a/Types/Key.hs +++ b/Types/Key.hs @@ -15,6 +15,7 @@ module Types.Key ( file2key, nonChunkKey, chunkKeyOffset, + isChunkKey, prop_idempotent_key_encode, prop_idempotent_key_decode @@ -62,6 +63,9 @@ chunkKeyOffset k = (*) <$> keyChunkSize k <*> (pred <$> keyChunkNum k) +isChunkKey :: Key -> Bool +isChunkKey k = isJust (keyChunkSize k) && isJust (keyChunkNum k) + fieldSep :: Char fieldSep = '-' |