Skip to content

Commit ed97209

Browse files
fix Windows Readdir module - unsafeFromChunk type change
1 parent 048e311 commit ed97209

File tree

1 file changed

+2
-5
lines changed
  • core/src/Streamly/Internal/FileSystem/Windows

1 file changed

+2
-5
lines changed

core/src/Streamly/Internal/FileSystem/Windows/ReadDir.hsc

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -207,9 +207,6 @@ readDirStreamEither _ (DirStream (h, ref, fdata)) =
207207

208208
where
209209

210-
mkPath :: Array Word8 -> WindowsPath
211-
mkPath = Path.unsafeFromChunk
212-
213210
processEntry ptr = do
214211
let dname = #{ptr WIN32_FIND_DATAW, cFileName} ptr
215212
dattrs :: #{type DWORD} <-
@@ -220,8 +217,8 @@ readDirStreamEither _ (DirStream (h, ref, fdata)) =
220217
isMeta <- isMetaDir dname
221218
if isMeta
222219
then findNext ptr
223-
else return (Just (Left (mkPath (Array.unsafeCast name))))
224-
else return (Just (Right (mkPath (Array.unsafeCast name))))
220+
else return (Just (Left (Path.unsafeFromChunk name)))
221+
else return (Just (Right (Path.unsafeFromChunk name)))
225222

226223
findNext ptr = do
227224
retval <- liftIO $ c_FindNextFileW h ptr

0 commit comments

Comments
 (0)