Make this buildable again

This commit is contained in:
2020-02-16 22:06:07 +01:00
parent 8e533e2465
commit e4754f4e4e
6 changed files with 183 additions and 13 deletions

View File

@@ -49,7 +49,7 @@ import System.Posix.Temp.ByteString
import "unix" System.Posix.IO.ByteString
hiding ( fdWrite )
import System.Posix.FD as FD
import System.Posix.Directory.Foreign ( oTrunc )
import System.Posix.Foreign ( oTrunc )
import qualified Data.ByteString as B
import OpenSSL ( withOpenSSL )
import qualified Data.ByteString.Char8 as C

View File

@@ -17,7 +17,7 @@ import Control.Monad
import Control.Exception.Safe
import Data.Functor
import System.Posix.Files.ByteString
import System.Posix.Directory.Foreign ( oExcl )
import System.Posix.Foreign ( oExcl )
import System.IO
import "unix" System.Posix.IO.ByteString
hiding ( openFd )
@@ -149,8 +149,5 @@ captureOutStreams action =
-- | Create a new regular file in write-only mode. The file must not exist.
createRegularFileFd :: FileMode -> Path b -> IO Fd
createRegularFileFd fm dest = FD.openFd
(toFilePath dest)
WriteOnly
[oExcl]
(Just fm)
createRegularFileFd fm dest =
FD.openFd (toFilePath dest) WriteOnly [oExcl] (Just fm)

View File

@@ -74,6 +74,3 @@ handleIO' :: IOErrorType -> (IOException -> IO ()) -> IO () -> IO ()
handleIO' err handler =
handleIO (\e -> if err == ioeGetErrorType e then handler e else ioError e)
hideError :: IOErrorType -> IO () -> IO ()
hideError err = handleIO (\e -> if err == ioeGetErrorType e then pure () else ioError e)