diff options
author | Joey Hess <joeyh@joeyh.name> | 2016-12-24 14:46:31 -0400 |
---|---|---|
committer | Joey Hess <joeyh@joeyh.name> | 2016-12-24 14:46:31 -0400 |
commit | 3b9d9a267b7c9247d36d9b622e1b836724ca5fb0 (patch) | |
tree | 7c57f49555835e462e0f69ba133bbfdaaf215368 /Build | |
parent | 2aba1975e8192e7c60ef85118b40654b60cad027 (diff) |
Always use filesystem encoding for all file and handle reads and writes.
This is a big scary change. I have convinced myself it should be safe. I
hope!
Diffstat (limited to 'Build')
-rw-r--r-- | Build/DistributionUpdate.hs | 2 | ||||
-rw-r--r-- | Build/EvilSplicer.hs | 5 |
2 files changed, 5 insertions, 2 deletions
diff --git a/Build/DistributionUpdate.hs b/Build/DistributionUpdate.hs index 814927e99..dd18a7883 100644 --- a/Build/DistributionUpdate.hs +++ b/Build/DistributionUpdate.hs @@ -14,6 +14,7 @@ import Build.Version (getChangelogVersion, Version) import Utility.UserInfo import Utility.Url import Utility.Tmp +import Utility.FileSystemEncoding import qualified Git.Construct import qualified Annex import Annex.Content @@ -50,6 +51,7 @@ autobuilds = main :: IO () main = do + useFileSystemEncoding version <- liftIO getChangelogVersion repodir <- getRepoDir changeWorkingDirectory repodir diff --git a/Build/EvilSplicer.hs b/Build/EvilSplicer.hs index ca690c250..32d9a1c9f 100644 --- a/Build/EvilSplicer.hs +++ b/Build/EvilSplicer.hs @@ -210,7 +210,6 @@ applySplices destdir imports splices@(first:_) = do when (oldcontent /= Just newcontent) $ do putStrLn $ "splicing " ++ f withFile dest WriteMode $ \h -> do - fileEncoding h hPutStr h newcontent hClose h where @@ -721,7 +720,9 @@ parsecAndReplace p s = case parse find "" s of find = many $ try (Right <$> p) <|> (Left <$> anyChar) main :: IO () -main = go =<< getArgs +main = do + useFileSystemEncoding + go =<< getArgs where go (destdir:log:header:[]) = run destdir log (Just header) go (destdir:log:[]) = run destdir log Nothing |