@@ -175,6 +175,7 @@ import GHC.IO.Handle.FD (mkHandleFromFD)
175import Streamly.Prelude (SerialT)
175import Streamly.Prelude (SerialT)
176import Streamly.Internal.Data.Parser (Parser)
176import Streamly.Internal.Data.Parser (Parser)
177import Streamly.Internal.Data.Array.Foreign.Type (Array(..), byteLength)
177import Streamly.Internal.Data.Array.Foreign.Type (Array(..), byteLength)
178+import System.Directory (doesDirectoryExist)
178import System.IO (Handle, hClose, IOMode(ReadMode))
179import System.IO (Handle, hClose, IOMode(ReadMode))
179#if !MIN_VERSION_base(4,10,0)
180#if !MIN_VERSION_base(4,10,0)
180import Control.Concurrent.MVar (readMVar)
181import Control.Concurrent.MVar (readMVar)
@@ -193,7 +194,6 @@ import qualified Streamly.Internal.Data.Fold as FL
193import qualified Streamly.Internal.Data.Parser as PR
194import qualified Streamly.Internal.Data.Parser as PR
194import qualified Streamly.Internal.Data.Stream.IsStream as S
195import qualified Streamly.Internal.Data.Stream.IsStream as S
195import qualified Streamly.Internal.FileSystem.Dir as Dir
196import qualified Streamly.Internal.FileSystem.Dir as Dir
196−import qualified System.Directory as Dir
197import qualified Streamly.Internal.FileSystem.Handle as FH
197import qualified Streamly.Internal.FileSystem.Handle as FH
198import qualified Streamly.Internal.Unicode.Stream as U
198import qualified Streamly.Internal.Unicode.Stream as U
@@ -746,7 +746,7 @@ addToWatch cfg@Config{..} watch0@(Watch handle wdMap) root0 path0 = do
747 -- XXX toDirs currently uses paths as String, we need to convert it
747 -- XXX toDirs currently uses paths as String, we need to convert it
748 -- to "/" separated by byte arrays.
748 -- to "/" separated by byte arrays.
749− pathIsDir <- Dir.doesDirectoryExist $ utf8ToString absPath
749+ pathIsDir <- doesDirectoryExist $ utf8ToString absPath
750 when (watchRec && pathIsDir) $ do
750 when (watchRec && pathIsDir) $ do
751 S.mapM_ (\p -> addToWatch cfg watch0 root (appendPaths path p))
751 S.mapM_ (\p -> addToWatch cfg watch0 root (appendPaths path p))
752 $ S.mapM toUtf8
752 $ S.mapM toUtf8