From e194fdec91dae463636a2f8d8af167c824d8c919 Mon Sep 17 00:00:00 2001 From: Julian Ospald Date: Tue, 14 Apr 2020 10:40:33 +0200 Subject: [PATCH] More --- hpath-posix/hpath-posix.cabal | 1 + .../src/System/Posix/RawFilePath/Directory/Traversals.hs | 4 +++- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/hpath-posix/hpath-posix.cabal b/hpath-posix/hpath-posix.cabal index c754b4c..140d654 100644 --- a/hpath-posix/hpath-posix.cabal +++ b/hpath-posix/hpath-posix.cabal @@ -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 diff --git a/hpath-posix/src/System/Posix/RawFilePath/Directory/Traversals.hs b/hpath-posix/src/System/Posix/RawFilePath/Directory/Traversals.hs index a45defd..d5c5bbc 100644 --- a/hpath-posix/src/System/Posix/RawFilePath/Directory/Traversals.hs +++ b/hpath-posix/src/System/Posix/RawFilePath/Directory/Traversals.hs @@ -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)