@@ -196,12 +196,12 @@ getRealDirType _ SocketType = return SocketType
196196getRealDirType _ WhiteoutType = return WhiteoutType
197197getRealDirType getFileStatus _ = do
198198 stat <- getFileStatus
199- return $ if | isBlockDevice stat -> BlockDeviceType
200- | isCharacterDevice stat -> CharacterDeviceType
201- | isNamedPipe stat -> NamedPipeType
202- | isRegularFile stat -> RegularFileType
199+ return $ if | isRegularFile stat -> RegularFileType
203200 | isDirectory stat -> DirectoryType
204201 | isSymbolicLink stat -> SymbolicLinkType
202+ | isBlockDevice stat -> BlockDeviceType
203+ | isCharacterDevice stat -> CharacterDeviceType
204+ | isNamedPipe stat -> NamedPipeType
205205 | isSocket stat -> SocketType
206206 | otherwise -> UnknownType
207207
@@ -255,7 +255,7 @@ readDirStreamWith f dstream = alloca
255255-- | A version of 'readDirStreamWith' that takes a pre-allocated pointer in
256256-- addition to the other arguments. This pointer is used to store the pointer
257257-- to the next directory entry, if there is any. This function is intended for
258- -- usecases where you need to read a lot of directory entries and want to
258+ -- use cases where you need to read a lot of directory entries and want to
259259-- reuse the pointer for each of them. Using for example 'readDirStream' or
260260-- 'readDirStreamWith' in this scenario would allocate a new pointer for each
261261-- call of these functions.
0 commit comments