diff options
author | Joey Hess <joey@kitenet.net> | 2014-04-20 12:46:33 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-04-20 12:46:33 -0400 |
commit | 7c01390d8bca54c00d1b832070956d3707052605 (patch) | |
tree | baa451cc4af7b52c6e6150dcb79012b9cb185e8b /Creds.hs | |
parent | b46eb75c7647719ed586bbe1a447033090a36526 (diff) |
webapp: Fix UI for removing XMPP connection.
Diffstat (limited to 'Creds.hs')
-rw-r--r-- | Creds.hs | 7 |
1 files changed, 7 insertions, 0 deletions
@@ -14,6 +14,7 @@ module Creds ( getEnvCredPair, writeCacheCreds, readCacheCreds, + removeCreds, ) where import Common.Annex @@ -138,3 +139,9 @@ decodeCredPair :: Creds -> Maybe CredPair decodeCredPair creds = case lines creds of l:p:[] -> Just (l, p) _ -> Nothing + +removeCreds :: FilePath -> Annex () +removeCreds file = do + d <- fromRepo gitAnnexCredsDir + let f = d </> file + liftIO $ nukeFile f |