/* -*-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
(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);
}