From b5308ef514d05cf10bd4a82a0c8cbcbc31c858f7 Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Tue, 7 Feb 1995 23:53:05 +0000 Subject: [PATCH] Never signal an error from file probe. There are too many things that can go wrong, so it's pointless to try to enumerate them. --- v7/src/microcode/os2fs.c | 31 +++++++++++-------------------- 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/v7/src/microcode/os2fs.c b/v7/src/microcode/os2fs.c index 5b1095e4f..2ea6f0db8 100644 --- a/v7/src/microcode/os2fs.c +++ b/v7/src/microcode/os2fs.c @@ -1,6 +1,6 @@ /* -*-C-*- -$Id: os2fs.c,v 1.4 1995/01/16 20:57:00 cph Exp $ +$Id: os2fs.c,v 1.5 1995/02/07 23:53:05 cph Exp $ Copyright (c) 1994-95 Massachusetts Institute of Technology @@ -78,25 +78,16 @@ OS2_read_file_status (const char * filename) (name [1]) = '.'; (name [2]) = '\0'; } - XTD_API_CALL - (dos_query_path_info, - (name, FIL_STANDARD, (&info), (sizeof (info))), - { - if ((rc == ERROR_FILE_NOT_FOUND) - || (rc == ERROR_PATH_NOT_FOUND) - /* ERROR_ACCESS_DENIED can occur if the file is a symbolic - link on a unix system mounted via NFS, and if the - symbolic link points to a nonexistent file. */ - || (rc == ERROR_ACCESS_DENIED) - || (rc == ERROR_INVALID_DRIVE) - || (rc == ERROR_NOT_READY) - || (rc == ERROR_NOT_DOS_DISK) - || (rc == ERROR_DISK_CHANGE) - || (rc == ERROR_FILENAME_EXCED_RANGE) - || (rc == ERROR_INVALID_FSD_NAME) - || (rc == ERROR_INVALID_PATH)) - return (0); - }); + { + APIRET rc + = (dos_query_path_info (name, FIL_STANDARD, (&info), (sizeof (info)))); + /* So many different things can go wrong here that it is a bad + idea to attempt to enumerate them. Several times I have + thought I had all the possible conditions and later discovered + that I was wrong. */ + if (rc != NO_ERROR) + return (0); + } return (&info); } -- 2.25.1