diff options
author | Joey Hess <joey@kitenet.net> | 2012-08-09 13:54:54 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2012-08-09 13:54:54 -0400 |
commit | ad4e152fd656bf16b227ffed9d65e01c3e181fcc (patch) | |
tree | 6e3cd5e6caaa479dc43d2842ae17f7d5d907ad27 /Remote/S3.hs | |
parent | 5fc8c2b07b97baf7f08f9360ca375ad73aea2934 (diff) |
S3: Add fileprefix setting.
Diffstat (limited to 'Remote/S3.hs')
-rw-r--r-- | Remote/S3.hs | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Remote/S3.hs b/Remote/S3.hs index dca08fff8..bec089a4a 100644 --- a/Remote/S3.hs +++ b/Remote/S3.hs @@ -212,9 +212,11 @@ s3Action r noconn action = do bucketFile :: Remote -> Key -> FilePath bucketFile r = munge . show where - munge s = case M.lookup "mungekeys" $ fromJust $ config r of - Just "ia" -> iaMunge s - _ -> s + munge s = case M.lookup "mungekeys" c of + Just "ia" -> iaMunge $ prefix ++ s + _ -> prefix ++ s + prefix = M.findWithDefault "" "fileprefix" c + c = fromJust $ config r bucketKey :: Remote -> String -> Key -> S3Object bucketKey r bucket k = S3Object bucket (bucketFile r k) "" [] L.empty |