avoid hard dependency on new version of aws

This commit is contained in:
Joey Hess 2015-09-22 11:03:44 -04:00
parent 26d6566307
commit 20205b6073
4 changed files with 10 additions and 6 deletions

View file

@ -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