avoid hard dependency on new version of aws
This commit is contained in:
parent
26d6566307
commit
20205b6073
4 changed files with 10 additions and 6 deletions
|
@ -499,8 +499,11 @@ getBucketName = map toLower <$$> M.lookup "bucket"
|
|||
|
||||
getStorageClass :: RemoteConfig -> S3.StorageClass
|
||||
getStorageClass c = case M.lookup "storageclass" c of
|
||||
Just "REDUCED_REDUNDANCY" -> S3.ReducedRedundancy
|
||||
#if MIN_VERSION_aws(0,13,0)
|
||||
Just s -> S3.OtherStorageClass (T.pack s)
|
||||
Nothing -> S3.Standard
|
||||
#endif
|
||||
_ -> S3.Standard
|
||||
|
||||
getPartSize :: RemoteConfig -> Maybe Integer
|
||||
getPartSize c = readSize dataUnits =<< M.lookup "partsize" c
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue