More
This commit is contained in:
parent
dc4e652f3a
commit
e194fdec91
@ -34,6 +34,7 @@ library
|
||||
build-depends: base >= 4.8 && <5
|
||||
, IfElse
|
||||
, bytestring >= 0.10
|
||||
, deepseq
|
||||
, exceptions >= 0.10
|
||||
, hpath-filepath >= 0.10.3
|
||||
, safe-exceptions >= 0.1
|
||||
|
@ -41,6 +41,7 @@ module System.Posix.RawFilePath.Directory.Traversals (
|
||||
#if __GLASGOW_HASKELL__ < 710
|
||||
import Control.Applicative ((<$>))
|
||||
#endif
|
||||
import Control.DeepSeq
|
||||
import Control.Monad
|
||||
import System.Posix.FilePath ((</>))
|
||||
import System.Posix.Foreign
|
||||
@ -193,10 +194,11 @@ readDirEnt (unpackDirStream -> dirp) =
|
||||
if (r == 0)
|
||||
then do
|
||||
dEnt <- peek ptr_dEnt
|
||||
putStrLn $ "readDirEnt dEnt " ++ (show dEnt)
|
||||
if (dEnt == nullPtr)
|
||||
then return (dtUnknown,BS.empty)
|
||||
else do
|
||||
dName <- c_name dEnt >>= peekFilePath
|
||||
dName <- c_name dEnt >>= peekFilePath >>= evaluate . force
|
||||
dType <- c_type dEnt
|
||||
c_freeDirEnt dEnt
|
||||
putStrLn $ "readDirEnt" ++ (show dName)
|
||||
|
Loading…
Reference in New Issue
Block a user