diff options
author | Joey Hess <joey@kitenet.net> | 2014-02-03 10:08:28 -0400 |
---|---|---|
committer | Joey Hess <joey@kitenet.net> | 2014-02-03 10:08:28 -0400 |
commit | 6295ec998fb65607fb8c1d88035b41fa0cb3b0d6 (patch) | |
tree | d0beeb09a7e2488abad86ccad93afee524c8baa7 /Annex/Content | |
parent | 10ad429a1e7028e464c02b91088d0952a3bfa5f8 (diff) |
factor out utility function
Diffstat (limited to 'Annex/Content')
-rw-r--r-- | Annex/Content/Direct.hs | 9 |
1 files changed, 2 insertions, 7 deletions
diff --git a/Annex/Content/Direct.hs b/Annex/Content/Direct.hs index a5d71288b..35d2c9b8d 100644 --- a/Annex/Content/Direct.hs +++ b/Annex/Content/Direct.hs @@ -66,15 +66,10 @@ changeAssociatedFiles key transform = do let files' = transform files when (files /= files') $ do modifyContent mapping $ - liftIO $ viaTmp write mapping $ unlines files' + liftIO $ viaTmp writeFileAnyEncoding mapping $ + unlines files' top <- fromRepo Git.repoPath return $ map (top </>) files' - where - write file content = do - h <- openFile file WriteMode - fileEncoding h - hPutStr h content - hClose h {- Removes the list of associated files. -} removeAssociatedFiles :: Key -> Annex () |