From b3ee1106e4b4fc62ec45bb6ea84fc2cbb92c17bb Mon Sep 17 00:00:00 2001 From: ronny Date: Thu, 20 Jun 2002 09:18:11 +0000 Subject: Always try to open files in current directory. git-svn-id: https://svn.cs.ru.nl/repos/clean-compiler/trunk@1127 1f8540f1-abd5-4d5b-9d24-4c5ce8603e2d --- frontend/scanner.icl | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/frontend/scanner.icl b/frontend/scanner.icl index a6434c6..2c17c50 100644 --- a/frontend/scanner.icl +++ b/frontend/scanner.icl @@ -1522,8 +1522,14 @@ fopenInSearchPaths fileName searchPaths mode modtimefunction f = (No, f) where fopenAnywhereInSearchPaths :: !{#Char} ![{#Char}] !Int (ModTimeFunction *f) *f -> (Optional (*File, {#Char}),!*f) | FileSystem f - fopenAnywhereInSearchPaths fileName [] _ _ f - = (No, f) + fopenAnywhereInSearchPaths fileName [] mode modtimefunction f + // try current directory + # (opened, file, f) + = fopen fileName mode f + | opened + = getModificationTime file "" modtimefunction f + // otherwise + = (No, f) fopenAnywhereInSearchPaths fileName [path : paths] mode modtimefunction f # (opened, file, f) = fopen (path + fileName) mode f -- cgit v1.2.3