From 280934111ef5615206c4cfd13e07a347a42e6ba4 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Thu, 9 May 2013 13:57:31 -0400 Subject: [PATCH] fix for Android --- Creds.hs | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/Creds.hs b/Creds.hs index 4c6896663d..943276e3cd 100644 --- a/Creds.hs +++ b/Creds.hs @@ -122,13 +122,7 @@ writeCacheCreds :: Creds -> FilePath -> Annex () writeCacheCreds creds file = do d <- fromRepo gitAnnexCredsDir createAnnexDirectory d - liftIO $ do - let f = d file - h <- openFile f WriteMode - modifyFileMode f $ removeModes - [groupReadMode, otherReadMode] - hPutStr h creds - hClose h + liftIO $ writeFileProtected (d file) creds readCacheCredPair :: CredPairStorage -> Annex (Maybe CredPair) readCacheCredPair storage = maybe Nothing decodeCredPair