#4812: doesDirectoryExist always returns False on Mac OS X
------------------------------------+---------------------------------------
    Reporter:  YitzGale             |        Owner:              
        Type:  bug                  |       Status:  new         
    Priority:  normal               |    Milestone:              
   Component:  libraries/directory  |      Version:  6.12.3      
    Keywords:                       |     Testcase:              
   Blockedby:                       |   Difficulty:              
          Os:  MacOS X              |     Blocking:              
Architecture:  Unknown/Multiple     |      Failure:  None/Unknown
------------------------------------+---------------------------------------

Comment(by simonmar):

 unix is a dependency of directory, from `directory.cabal`:

 {{{
       if os(windows) {
           build-depends: Win32
       } else {
           build-depends: unix
       }
 }}}

 I suspect the problem has something to do with this

 {{{
 Fri Feb 26 09:31:44 GMT 2010  Simon Marlow <[email protected]>
   * Fix #3878: various directory tests were wrong on Unix systems
     {
     hunk ./System/Directory.hs 206
     -  let is_dir = Posix.fileMode stat .&. Posix.directoryMode /= 0
     +  let is_dir = Posix.isDirectory stat
     hunk ./System/Directory.hs 376
     -              if Posix.fileMode stat .&. Posix.directoryMode /= 0 $
     +              if Posix.isDirectory stat
     hunk ./System/Directory.hs 621
     -   let is_dir = Posix.fileMode stat .&. Posix.directoryMode /= 0
     +   let is_dir = Posix.isDirectory stat
     hunk ./System/Directory.hs 901
     -       return (Posix.fileMode stat .&. Posix.directoryMode /= 0))
     +       return (Posix.isDirectory stat))
     hunk ./System/Directory.hs 915
     -       return (Posix.fileMode stat .&. Posix.directoryMode == 0))
     +       return (not (Posix.isDirectory stat)))
     }
 }}}

 that patch itself should be fine, and it certainly works here, so
 something else must be going wrong.  I suspect it's one of those 32/64-bit
 problems with the FFI on OS X 10.6: probably the unix package is using the
 wrong offsets for `struct stat`, so that `Posix.isDirectory` isn't working
 correctly.

 Does that give someone enough clues to fully diagnose the problem?

-- 
Ticket URL: <http://hackage.haskell.org/trac/ghc/ticket/4812#comment:1>
GHC <http://www.haskell.org/ghc/>
The Glasgow Haskell Compiler

_______________________________________________
Glasgow-haskell-bugs mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/glasgow-haskell-bugs

Reply via email to