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