Skip to content

Commit

Permalink
Fix a bug in Posix.ReadDir.lstatDname
Browse files Browse the repository at this point in the history
  • Loading branch information
adithyaov committed Jan 3, 2025
1 parent 44bb0ca commit 0fe81a6
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions core/src/Streamly/Internal/FileSystem/Posix/ReadDir.hsc
Original file line number Diff line number Diff line change
Expand Up @@ -152,8 +152,8 @@ lstatDname parent dname = do
Array.asCStringUnsafe (Path.toChunk path) $ \cStr -> do
res <- c_lstat_is_directory cStr
case res of
x | x == 0 -> pure (True, False)
x | x == 1 -> pure (False, False)
x | x == 1 -> pure (True, False)
x | x == 0 -> pure (False, False)
-- XXX Need to check if and how we should handle some errors
-- like EACCES.
_ -> throwErrno "checkIfDirectory"
Expand Down

0 comments on commit 0fe81a6

Please sign in to comment.