diff options
author | Joey Hess <joeyh@joeyh.name> | 2017-09-12 12:42:44 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2017-09-12 12:42:44 -0400 |
commit | 77d12a9d0ecf75d74508d9a08bfc31e37cae6839 (patch) | |
tree | 31e77f9e069c564f829e91b8db756624e960b7ca | |
parent | 96ddbf12195da0bd836f356a3b3637e449e91ca7 (diff) |
avoid showing error when copy fails
Since renameExport is allowed to fail for any reason, and its failure is
always recovered from by doing a new upload and deleting the old
content, this avoids unnecessary noise.
Copying a file on the IA failed, apparently something wrong with their
emulation of S3:
S3Error {s3StatusCode = Status {statusCode = 400, statusMessage = "Bad Request"}, s3ErrorCode = "InvalidArgument", s3ErrorMessage = "Invalid Argument", s3ErrorResource = Just "x-(amz|archive)-copy-source header is bad: 'joeyh-public-test2/foo'", s3ErrorHostId = Nothing, s3ErrorAccessKeyId = Nothing, s3ErrorStringToSign = Nothing, s3ErrorBucket = Nothing, s3ErrorEndpointRaw = Nothing, s3ErrorEndpoint = Nothing}
This commit was sponsored by Jake Vosloo on Patreon.
-rw-r--r-- | Remote/S3.hs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index 396d2c388..bfb80b61f 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -362,7 +362,7 @@ checkPresentExportS3 r info _k 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) +renameExportS3 r info _k src dest = catchNonAsync go (\_ -> return False) where go = withS3Handle (config r) (gitconfig r) (uuid r) $ \h -> do let co = S3.copyObject (bucket info) dstobject |