diff options
author | Joey Hess <joey@kitenet.net> | 2011-06-30 00:42:09 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-06-30 00:46:39 -0400 |
commit | 2cda9d0a0fcdd1cc2aebc066ef19282fbe36e898 (patch) | |
tree | de4244439c340a664afd2993b7203ca8ac31e0cd /Command | |
parent | d72fb5acc28af3ea6380dd09518f7d1382dea8d2 (diff) |
generalized safeWriteFile to viaTmp
Diffstat (limited to 'Command')
-rw-r--r-- | Command/Init.hs | 2 | ||||
-rw-r--r-- | Command/Unused.hs | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/Command/Init.hs b/Command/Init.hs index 7f5773117..8cde8bb9f 100644 --- a/Command/Init.hs +++ b/Command/Init.hs @@ -55,7 +55,7 @@ gitPreCommitHookWrite repo = do if exists then warning $ "pre-commit hook (" ++ hook ++ ") already exists, not configuring" else liftIO $ do - safeWriteFile hook preCommitScript + viaTmp writeFile hook preCommitScript p <- getPermissions hook setPermissions hook $ p {executable = True} where diff --git a/Command/Unused.hs b/Command/Unused.hs index c0a347179..a9d5f90a1 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -86,7 +86,7 @@ checkRemoteUnused' r = do writeUnusedFile :: FilePath -> [(Int, Key)] -> Annex () writeUnusedFile prefix l = do g <- Annex.gitRepo - liftIO $ safeWriteFile (gitAnnexUnusedLog prefix g) $ + liftIO $ viaTmp writeFile (gitAnnexUnusedLog prefix g) $ unlines $ map (\(n, k) -> show n ++ " " ++ show k) l table :: [(Int, Key)] -> [String] |