File tree Expand file tree Collapse file tree 1 file changed +5
-6
lines changed
core/src/Streamly/Internal/FileSystem/Posix Expand file tree Collapse file tree 1 file changed +5
-6
lines changed Original file line number Diff line number Diff line change @@ -42,6 +42,7 @@ import Streamly.Internal.Data.Stream (Stream(..), Step(..))
4242import qualified Streamly.Internal.Data.Array as Array
4343import qualified Streamly.Internal.Data.MutByteArray as MutByteArray
4444import qualified Streamly.Internal.Data.Unfold as UF (bracketIO )
45+ import qualified Streamly.Internal.FileSystem.Path.Common as PathC
4546import qualified Streamly.Internal.FileSystem.PosixPath as Path
4647
4748#include <dirent.h>
@@ -283,13 +284,11 @@ eitherReader =
283284
284285{-# INLINE appendCString #-}
285286appendCString :: PosixPath -> CString -> IO PosixPath
286- appendCString a b = do
287- -- XXX We do not need to create an Array from the CString first. We can
288- -- append it directly if Path can provide a known length stream append
289- -- operation. Should we ensure that this is pinned in the DT_UNKNOWN case
287+ appendCString x@ (PosixPath a) b = do
288+ -- XXX Should we ensure that this is pinned in the DT_UNKNOWN case
290289 -- because we always pass it to a C function which pins it anyway.
291- b1 <- Array. fromCString (castPtr b)
292- pure $ Path. append a ( Path. unsafeFromChunk b1)
290+ arr <- PathC. appendCString PathC. Posix a b
291+ pure $ PosixPath arr
293292
294293{-# ANN type ChunkStreamState Fuse #-}
295294data ChunkStreamState =
You can’t perform that action at this time.
0 commit comments