diff --git a/core/src/Streamly/Internal/FileSystem/Posix/ReadDir.hsc b/core/src/Streamly/Internal/FileSystem/Posix/ReadDir.hsc index c4788da440..eac23a9101 100644 --- a/core/src/Streamly/Internal/FileSystem/Posix/ReadDir.hsc +++ b/core/src/Streamly/Internal/FileSystem/Posix/ReadDir.hsc @@ -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"