id,summary,reporter,owner,description,type,status,priority,milestone,component,version,resolution,keywords,cc,os,architecture,failure,difficulty,testcase,blockedby,blocking,related
2709,"System.Directory.doesDirectoryExist ""\\"" is False on Windows",Deewiant,igloo,"{{{
import System.Directory

main = do
   print =<< doesDirectoryExist ""\\""
   print =<< doesDirectoryExist ""\\.""
}}}

The above prints `False` followed by `True`, and both should definitely be `True`. It seems like it might even be a bug in MinGW or the MSVCRT.

The following does work, giving both as `True`:

{{{
import Data.Bits
import System.Win32.Types
import System.Win32.File

doesDirectoryExist = flip withTString $ \s -> do
   a <- c_GetFileAttributes s
   return (a /= 0xffffffff && a.&.fILE_ATTRIBUTE_DIRECTORY /= 0)

main = do
   print =<< doesDirectoryExist ""\\""
   print =<< doesDirectoryExist ""\\.""
}}}",bug,closed,high,6.10.2,libraries/directory,6.10.1,fixed,,ndmitchell@…,Windows,Unknown/Multiple,,Unknown,,,,
