fix build with unix-2.8.0

got the arguments the wrong way around when I wrote this

also squelch a build warning
This commit is contained in:
Joey Hess 2023-08-01 18:27:12 -04:00
parent 63f76d0ac3
commit eb8e30a2f1
No known key found for this signature in database
GPG key ID: DB12DB0FF05F8F38

View file

@ -44,8 +44,11 @@ import qualified Data.ByteString.Char8 as S8
import qualified Data.ByteString.Lazy as L
import qualified System.FilePath.ByteString as P
#ifndef mingw32_HOST_OS
#if MIN_VERSION_unix(2,8,0)
#else
import System.PosixCompat.Files (isSymbolicLink)
#endif
#endif
type LinkTarget = S.ByteString
@ -435,7 +438,7 @@ isPointerFile f = catchDefaultIO Nothing $
#else
#if MIN_VERSION_unix(2,8,0)
bracket
(openFd (fromRawFilePath f) ReadOnly (defaultFileFlags { nofollow = True }) Nothing)
(openFd (fromRawFilePath f) ReadOnly (defaultFileFlags { nofollow = True }))
closeFd
(\fd -> readhandle =<< fdToHandle fd)
#else