diff options
author | 2012-09-19 16:08:37 -0400 | |
---|---|---|
committer | 2012-09-19 16:08:37 -0400 | |
commit | aff09a1f33be7b3df182a7c85b30a2d3e04833c7 (patch) | |
tree | 6d7cb4ed4e9483c14bdd832c9af848dc1b866789 /Remote/S3.hs | |
parent | 3c81d70c1beccb50571281ef35c9123bac006b7c (diff) |
add a progress callback to storeKey, and threaded it all the way through
Transfer info files are updated when the callback is called, updating
the number of bytes transferred.
Left unused p variables at every place the callback should be used.
Which is rather a lot..
Diffstat (limited to 'Remote/S3.hs')
-rw-r--r-- | Remote/S3.hs | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 4efdb3071..12eb96add 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -115,14 +115,14 @@ s3Setup u c = handlehost $ M.lookup "host" c -- be human-readable M.delete "bucket" defaults -store :: Remote -> Key -> AssociatedFile -> Annex Bool -store r k _f = s3Action r False $ \(conn, bucket) -> do +store :: Remote -> Key -> AssociatedFile -> ProgressCallback -> Annex Bool +store r k _f p = s3Action r False $ \(conn, bucket) -> do dest <- inRepo $ gitAnnexLocation k res <- liftIO $ storeHelper (conn, bucket) r k dest s3Bool res -storeEncrypted :: Remote -> (Cipher, Key) -> Key -> Annex Bool -storeEncrypted r (cipher, enck) k = s3Action r False $ \(conn, bucket) -> +storeEncrypted :: Remote -> (Cipher, Key) -> Key -> ProgressCallback -> Annex Bool +storeEncrypted r (cipher, enck) k p = s3Action r False $ \(conn, bucket) -> -- To get file size of the encrypted content, have to use a temp file. -- (An alternative would be chunking to to a constant size.) withTmp enck $ \tmp -> do |