aboutsummaryrefslogtreecommitdiff
path: root/Remote
diff options
context:
space:
mode:
authorGravatar Joey Hess <joeyh@joeyh.name>2017-09-08 16:19:38 -0400
committerGravatar Joey Hess <joeyh@joeyh.name>2017-09-08 16:28:28 -0400
commit4e44bd5314174c2e71d93d124ec5067052f2ec56 (patch)
treeaa5fa2fae8890061ec90cf46cacc7ca4476e7a77 /Remote
parent5ef1c9b5690057e5b18dc7dcc3627776b400c544 (diff)
S3 export finalization
Fixed ACL issue, and updated some documentation.
Diffstat (limited to 'Remote')
-rw-r--r--Remote/S3.hs6
1 files changed, 4 insertions, 2 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs
index 96d24d00e..f80a08bb2 100644
--- a/Remote/S3.hs
+++ b/Remote/S3.hs
@@ -357,14 +357,16 @@ checkPresentExportS3 r info _k loc =
go = withS3Handle (config r) (gitconfig r) (uuid r) $ \h -> do
checkKeyHelper info h (T.pack $ bucketExportLocation info loc)
+-- S3 has no move primitive; copy and delete.
renameExportS3 :: Remote -> S3Info -> Key -> ExportLocation -> ExportLocation -> Annex Bool
renameExportS3 r info _k src dest = catchNonAsync go (\e -> warning (show e) >> return False)
where
go = withS3Handle (config r) (gitconfig r) (uuid r) $ \h -> do
- -- S3 has no move primitive; copy and delete.
- void $ sendS3Handle h $ S3.copyObject (bucket info) dstobject
+ let co = S3.copyObject (bucket info) dstobject
(S3.ObjectId (bucket info) srcobject Nothing)
S3.CopyMetadata
+ -- ACL is not preserved by copy.
+ void $ sendS3Handle h $ co { S3.coAcl = acl info }
void $ sendS3Handle h $ S3.DeleteObject srcobject (bucket info)
return True
srcobject = T.pack $ bucketExportLocation info src