Skip to content

Commit

Permalink
!should_fail
Browse files Browse the repository at this point in the history
  • Loading branch information
Rufflewind committed Jul 7, 2024
1 parent 40df015 commit cf9f3e1
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions System/Directory/Internal/Posix.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -127,7 +127,7 @@ exeExtensionInternal = exeExtension

getDirectoryContentsInternal :: OsPath -> IO [OsPath]
getDirectoryContentsInternal path =
withFileRef Nothing path getDirectoryRefContents
withFileRef Nothing (path </> os ".") getDirectoryRefContents

getDirectoryRefContents :: FileRef -> IO [OsPath]
getDirectoryRefContents fileRef =
Expand Down Expand Up @@ -193,7 +193,7 @@ type FileRef = Posix.Fd
withFileRef :: Maybe FileRef -> OsPath -> (FileRef -> IO r) -> IO r
withFileRef dirRef (OsString name) =
bracket
(Posix.openFdAt dirRef name Posix.ReadOnly defaultFlags)
(Posix.openFdAt dirRef name Posix.ReadOnly defaultFlags { Posix.nofollow = True, Posix.directory = True })
Posix.closeFd

data Subref = NotSubdir -- ^ Not a directory (perhaps regular file or symlink).
Expand Down

0 comments on commit cf9f3e1

Please sign in to comment.