got configure working after Utility.Path ByteString conversion

Had to split out some modules because getWorkingDirectory needs unix,
which is not a build-dep of configure.

This commit was sponsored by Brock Spratlen on Patreon.
This commit is contained in:
Joey Hess 2020-10-28 14:53:25 -04:00
parent e219aadbab
commit d6e94a6b2e
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38
10 changed files with 301 additions and 231 deletions

View file

@ -39,7 +39,7 @@ fdoDesktopMenu command = genDesktopEntry
installIcon :: FilePath -> FilePath -> IO ()
installIcon src dest = do
createDirectoryIfMissing True (parentDir dest)
createDirectoryIfMissing True (fromRawFilePath (parentDir (toRawFilePath dest)))
withBinaryFile src ReadMode $ \hin ->
withBinaryFile dest WriteMode $ \hout ->
hGetContents hin >>= hPutStr hout