couple fixes

This commit is contained in:
Joey Hess 2019-01-29 15:20:22 -04:00
parent 62edb7bee0
commit 8fc6c11cf1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -383,7 +383,7 @@ retrieveExportS3 u info mh _k loc f p =
exporturl = bucketExportLocation info loc exporturl = bucketExportLocation info loc
removeExportS3 :: UUID -> S3Info -> Maybe S3Handle -> Key -> ExportLocation -> Annex Bool removeExportS3 :: UUID -> S3Info -> Maybe S3Handle -> Key -> ExportLocation -> Annex Bool
removeExportS3 u info (Just h) k loc = checkVersioning info u $ removeExportS3 u info (Just h) k loc = checkVersioning info u k $
catchNonAsync go (\e -> warning (show e) >> return False) catchNonAsync go (\e -> warning (show e) >> return False)
where where
go = do go = do
@ -406,7 +406,7 @@ checkPresentExportS3 u info Nothing k loc = case getPublicUrlMaker info of
-- S3 has no move primitive; copy and delete. -- S3 has no move primitive; copy and delete.
renameExportS3 :: UUID -> S3Info -> Maybe S3Handle -> Key -> ExportLocation -> ExportLocation -> Annex Bool renameExportS3 :: UUID -> S3Info -> Maybe S3Handle -> Key -> ExportLocation -> ExportLocation -> Annex Bool
renameExportS3 u info (Just h) k src dest = checkVersioning info u k src $ renameExportS3 u info (Just h) k src dest = checkVersioning info u k $
catchNonAsync go (\_ -> return False) catchNonAsync go (\_ -> return False)
where where
go = do go = do
@ -864,7 +864,11 @@ getS3VersionIDPublicUrls mk info u k =
-- setting versioning in a bucket that git-annex has already exported -- setting versioning in a bucket that git-annex has already exported
-- files to risks losing the content of those un-versioned files. -- files to risks losing the content of those un-versioned files.
enableBucketVersioning :: SetupStage -> RemoteConfig -> RemoteGitConfig -> UUID -> Annex () enableBucketVersioning :: SetupStage -> RemoteConfig -> RemoteGitConfig -> UUID -> Annex ()
#if MIN_VERSION_aws(0,22,0)
enableBucketVersioning ss c gc u = do enableBucketVersioning ss c gc u = do
#else
enableBucketVersioning ss c _ _ = do
#endif
info <- extractS3Info c info <- extractS3Info c
case ss of case ss of
Init -> when (versioning info) $ Init -> when (versioning info) $