From 51173e3caf81419807a31da5f4df45cfb774f7bb Mon Sep 17 00:00:00 2001 From: simonmar Date: Thu, 18 Apr 2002 11:27:59 +0000 Subject: [PATCH] [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. --- ghc/compiler/ghci/InteractiveUI.hs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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 -- 1.7.10.4