S3: Fix incompatability with bucket names used by hS3; the aws library cannot handle upper-case bucket names. git-annex now converts them to lower case automatically.
For example, it failed to get files from a bucket named S3. Also fixes `git annex initremote UPPERCASE type=S3`, which failed with the new aws library, with a signing error message.
This commit is contained in:
parent
cfbeb1e7b7
commit
ee78958798
2 changed files with 5 additions and 2 deletions
|
@ -129,7 +129,7 @@ s3Setup' new u mcreds c = if configIA c then archiveorg else defaulthost
|
|||
c' <- setRemoteCredPair noEncryptionUsed c (AWS.creds u) mcreds
|
||||
-- Ensure user enters a valid bucket name, since
|
||||
-- this determines the name of the archive.org item.
|
||||
let validbucket = replace " " "-" $ map toLower $
|
||||
let validbucket = replace " " "-" $
|
||||
fromMaybe (error "specify bucket=") $
|
||||
getBucketName c'
|
||||
let archiveconfig =
|
||||
|
@ -447,7 +447,7 @@ extractS3Info c = do
|
|||
}
|
||||
|
||||
getBucketName :: RemoteConfig -> Maybe BucketName
|
||||
getBucketName = M.lookup "bucket"
|
||||
getBucketName = map toLower <$$> M.lookup "bucket"
|
||||
|
||||
getStorageClass :: RemoteConfig -> S3.StorageClass
|
||||
getStorageClass c = case M.lookup "storageclass" c of
|
||||
|
|
3
debian/changelog
vendored
3
debian/changelog
vendored
|
@ -8,6 +8,9 @@ git-annex (5.20150421) UNRELEASED; urgency=medium
|
|||
* S3: git annex enableremote will not create a bucket name, which
|
||||
failed since the bucket already exists.
|
||||
* Fix bogus failure of fsck --fast.
|
||||
* S3: Fix incompatability with bucket names used by hS3; the aws library
|
||||
cannot handle upper-case bucket names. git-annex now converts them to
|
||||
lower case automatically.
|
||||
|
||||
-- Joey Hess <id@joeyh.name> Tue, 21 Apr 2015 15:54:10 -0400
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue