From: simonmar Date: Thu, 18 Apr 2002 11:27:59 +0000 (+0000) Subject: [project @ 2002-04-18 11:27:59 by simonmar] X-Git-Tag: Approx_11550_changesets_converted~2144 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=51173e3caf81419807a31da5f4df45cfb774f7bb;hp=e0327bf79bd5e69dd4a9456c97c8c133b789e835;p=ghc-hetmet.git [project @ 2002-04-18 11:27:59 by simonmar] 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. --- diff --git a/ghc/compiler/ghci/InteractiveUI.hs b/ghc/compiler/ghci/InteractiveUI.hs index ded3bd8..87b19ea 100644 --- a/ghc/compiler/ghci/InteractiveUI.hs +++ b/ghc/compiler/ghci/InteractiveUI.hs @@ -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