diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-24 15:14:44 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-24 15:29:17 -0400 |
commit | 278ac4da12315a90aededea02993c68924bb7a76 (patch) | |
tree | 50d83dfadebee0e996d82c3678285e5a47c1da41 /Remote/Glacier.hs | |
parent | ddc3612609e100f9230c7f1157948ebaf8b9685f (diff) |
webapp: Fix creation of box.com, S3, and Glacier repositories, broken in 5.20140221.
Diffstat (limited to 'Remote/Glacier.hs')
-rw-r--r-- | Remote/Glacier.hs | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/Remote/Glacier.hs b/Remote/Glacier.hs index 84557851b..33719926c 100644 --- a/Remote/Glacier.hs +++ b/Remote/Glacier.hs @@ -73,16 +73,16 @@ gen r u c gc = new <$> remoteCost gc veryExpensiveRemoteCost glacierSetup :: Maybe UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID) glacierSetup mu mcreds c = do u <- maybe (liftIO genUUID) return mu - glacierSetup' (isJust mu) u mcreds c -glacierSetup' :: Bool -> UUID -> Maybe CredPair -> RemoteConfig -> Annex (RemoteConfig, UUID) -glacierSetup' enabling u mcreds c = do + c' <- setRemoteCredPair c (AWS.creds u) mcreds + glacierSetup' (isJust mu) u c' +glacierSetup' :: Bool -> UUID -> RemoteConfig -> Annex (RemoteConfig, UUID) +glacierSetup' enabling u c = do c' <- encryptionSetup c let fullconfig = c' `M.union` defaults unless enabling $ genVault fullconfig u gitConfigSpecialRemote u fullconfig "glacier" "true" - c'' <- setRemoteCredPair fullconfig (AWS.creds u) mcreds - return (c'', u) + return (c', u) where remotename = fromJust (M.lookup "name" c) defvault = remotename ++ "-" ++ fromUUID u |