diff options
author | Joey Hess <joey@kitenet.net> | 2013-05-09 13:57:31 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2013-05-09 13:57:31 -0400 |
commit | 04db8e49ce85924ad55713b1b79f41b7ccd23916 (patch) | |
tree | 85517f0b0ffc08ef62e229b6758301471740072f /Creds.hs | |
parent | dc132dfb0917925932a1472e6ea1dedb7988c430 (diff) |
fix for Android
Diffstat (limited to 'Creds.hs')
-rw-r--r-- | Creds.hs | 8 |
1 files changed, 1 insertions, 7 deletions
@@ -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 |