From 77d12a9d0ecf75d74508d9a08bfc31e37cae6839 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 12 Sep 2017 12:42:44 -0400 Subject: 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. --- Remote/S3.hs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'Remote') 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 -- cgit v1.2.3