diff options
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 |