more RawFilePath conversion

580/645

This commit was sponsored by Jack Hill on Patreon.
This commit is contained in:
Joey Hess 2020-11-03 18:34:27 -04:00
parent eb42cd4d46
commit 4bcb4030a5
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 61 additions and 50 deletions

View file

@ -51,7 +51,8 @@ ensureInstalled = ifM (isJust <$> getEnv "GIT_ANNEX_PACKAGE_INSTALL")
go (Just base) = do
let program = base </> "git-annex"
programfile <- programFile
createDirectoryIfMissing True (parentDir programfile)
createDirectoryIfMissing True $
fromRawFilePath (parentDir (toRawFilePath programfile))
writeFile programfile program
#ifdef darwin_HOST_OS
@ -100,7 +101,7 @@ installWrapper :: FilePath -> String -> IO ()
installWrapper file content = do
curr <- catchDefaultIO "" $ readFileStrict file
when (curr /= content) $ do
createDirectoryIfMissing True (parentDir file)
createDirectoryIfMissing True (fromRawFilePath (parentDir (toRawFilePath file)))
viaTmp writeFile file content
modifyFileMode file $ addModes [ownerExecuteMode]