[project @ 2002-04-18 11:27:59 by simonmar]
authorsimonmar <unknown>
Thu, 18 Apr 2002 11:27:59 +0000 (11:27 +0000)
committersimonmar <unknown>
Thu, 18 Apr 2002 11:27:59 +0000 (11:27 +0000)
Don't use doesFileExist on mingw32 as a replacement for checkPerms -
the argument might be a directory, in which case the result will be
False.  Just return True instead - if the file/directory doesn't
exist, the open operation will fail later.

ghc/compiler/ghci/InteractiveUI.hs

index ded3bd8..87b19ea 100644 (file)
@@ -1,6 +1,6 @@
 {-# OPTIONS -#include "Linker.h" -#include "SchedAPI.h" #-}
 -----------------------------------------------------------------------------
--- $Id: InteractiveUI.hs,v 1.119 2002/04/11 08:39:27 simonmar Exp $
+-- $Id: InteractiveUI.hs,v 1.120 2002/04/18 11:27:59 simonmar Exp $
 --
 -- GHC Interactive User Interface
 --
@@ -273,10 +273,10 @@ interactiveLoop is_tty = do
 
 checkPerms :: String -> IO Bool
 checkPerms name =
-  DriverUtil.handle (\_ -> return False) $ do
 #ifdef mingw32_TARGET_OS
-     doesFileExist name
+  return True
 #else
+  DriverUtil.handle (\_ -> return False) $ do
      st <- getFileStatus name
      me <- getRealUserID
      if fileOwner st /= me then do