diff options
author | Joey Hess <joeyh@joeyh.name> | 2015-11-02 11:14:03 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2015-11-02 11:14:03 -0400 |
commit | 184a20540beb47963afbca64bd9a3e96dbb7b020 (patch) | |
tree | 66afd9d82ad66d4f69c5bfc44edc535477766f71 /Remote/S3.hs | |
parent | 8fb6d8127c5cf1bc2a3e18981ed1fefb515106bf (diff) |
Fix failure to build with aws-0.13.0 and finish nearline support.
* Fix failure to build with aws-0.13.0.
* When built with aws-0.13.0, the S3 special remote can be used to create
google nearline buckets, by setting storageclass=NEARLINE.
Diffstat (limited to 'Remote/S3.hs')
-rw-r--r-- | Remote/S3.hs | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index fa88b84bc..fb772825c 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -330,10 +330,20 @@ genBucket c u = do (bucket info) (acl info) locconstraint +#if MIN_VERSION_aws(0,13,0) + storageclass +#endif writeUUIDFile c u info h locconstraint = mkLocationConstraint $ T.pack datacenter datacenter = fromJust $ M.lookup "datacenter" c +#if MIN_VERSION_aws(0,13,0) + -- "NEARLINE" as a storage class when creating a bucket is a + -- nonstandard extension of Google Cloud Storage. + storageclass = case getStorageClass c of + sc@(S3.OtherStorageClass "NEARLINE") -> Just sc + _ -> Nothing +#endif {- Writes the UUID to an annex-uuid file within the bucket. - |