Skip to content

getDirectoryContents yields wrong results

Executing getDirectoryContents on "c:" gives the contents of the current directory.[[BR]] The following program prints always True:

module Main (main) where

import System.Directory

main :: IO ()
main = do
  rootContents <- getDirectoryContents "c:"
  currContents <- getCurrentDirectory >>= getDirectoryContents
  putStrLn . show $ currContents == rootContents

Thanks

Trac metadata
Trac field Value
Version 6.10.4
Type Bug
TypeOfFailure OtherFailure
Priority normal
Resolution Unresolved
Component libraries/directory
Test case
Differential revisions
BlockedBy
Related
Blocking
CC
Operating system
Architecture
To upload designs, you'll need to enable LFS and have an admin enable hashed storage. More information