diff options
author | Joey Hess <joey@kitenet.net> | 2011-01-28 12:35:51 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2011-01-28 12:35:51 -0400 |
commit | 04fe906ac6e611fd59ef44244a01e8fe61abec6f (patch) | |
tree | cfcc6f6ca79bc55606135088d609237a8aacd1b2 /Command/Unused.hs | |
parent | 4f9336bb60ca4dc08ca271605de71415c98ec3ff (diff) |
use safewritefile
Diffstat (limited to 'Command/Unused.hs')
-rw-r--r-- | Command/Unused.hs | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Command/Unused.hs b/Command/Unused.hs index 5e5698e38..b9dc62a32 100644 --- a/Command/Unused.hs +++ b/Command/Unused.hs @@ -16,6 +16,7 @@ import Types import Content import Messages import Locations +import Utility import qualified Annex import qualified GitRepo as Git import qualified Backend @@ -43,7 +44,7 @@ checkUnused = do unused <- unusedKeys let list = number 1 unused g <- Annex.gitRepo - liftIO $ writeFile (gitAnnexUnusedLog g) $ unlines $ + liftIO $ safeWriteFile (gitAnnexUnusedLog g) $ unlines $ map (\(n, k) -> show n ++ " " ++ show k) list if null unused then return True |