From c5e42b71c8b1a235fc1b692f5617cb39552049ed Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Sat, 6 Apr 2013 16:14:57 -0400 Subject: changelog & minor style fixes --- Remote/Helper/Encryptable.hs | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'Remote/Helper') diff --git a/Remote/Helper/Encryptable.hs b/Remote/Helper/Encryptable.hs index ff7d4990b..b52d2e73a 100644 --- a/Remote/Helper/Encryptable.hs +++ b/Remote/Helper/Encryptable.hs @@ -32,9 +32,9 @@ encryptionSetup c = case (M.lookup "encryption" c, extractCipher c) of (Just "shared", Just (EncryptedCipher _ _)) -> cannotchange (Just _, Just (SharedCipher _)) -> cannotchange (Just "shared", Nothing) -> use "encryption setup" . genSharedCipher - =<< highRandomQuality + =<< highRandomQuality (Just keyid, Nothing) -> use "encryption setup" . genEncryptedCipher keyid - =<< highRandomQuality + =<< highRandomQuality (Just keyid, Just v) -> use "encryption updated" $ updateEncryptedCipher keyid v where cannotchange = error "Cannot change encryption type of existing remote." @@ -43,8 +43,9 @@ encryptionSetup c = case (M.lookup "encryption" c, extractCipher c) of showNote $ m ++ " " ++ describeCipher cipher return $ M.delete "encryption" $ M.delete "highRandomQuality" $ storeCipher c cipher - highRandomQuality = (&&) (maybe True (/="false") (M.lookup "highRandomQuality" c)) - <$> fmap not (Annex.getState Annex.fast) + highRandomQuality = + (&&) (maybe True ( /= "false") $ M.lookup "highRandomQuality" c) + <$> fmap not (Annex.getState Annex.fast) {- Modifies a Remote to support encryption. - -- cgit v1.2.3