2005-09-30 Angus Leeming <leeming@lyx.org>
+ * libs/filesystem/src/operations_posix_windows.cpp (exists):
+ add ERROR_ACCESS_DENIED to the list of "recognised" errors. It
+ appears that Win98SE returns such an error from GetFileAttributes
+ if asked to query a path on a drive that doesn't exist.
+
+ The "correct" fix is currently being discussed on the boost-devel
+ list, but this work around will do for us for now.
+
+2005-09-30 Angus Leeming <leeming-0hXrFu2P2+c@public.gmane.org>
+
* libs/filesystem/src/operations_posix_windows.cpp: add a block
of preprocessor code to include NewAPIs.h conditioned on the
WANT_GETFILEATTRIBUTESEX_WRAPPER macro. Enables runtime support
//
//////////////////////////////////////////////////////////////////////
# if defined(WANT_GETFILEATTRIBUTESEX_WRAPPER)
-# if (defined(__MINGW__) || defined(__CYGWIN__)) && WINVER < 0x040A
+# if (defined(__MINGW32__) || defined(__CYGWIN__)) && WINVER < 0x040A
// MinGW/Cygwin's winapi header files and NewAPIs.h do not live
// well together because NewAPIs.h redefines
// WIN32_FILE_ATTRIBUTE_DATA and GET_FILEEX_INFO_LEVELS
if(::GetFileAttributesA( ph.string().c_str() ) == 0xFFFFFFFF)
{
UINT err = ::GetLastError();
- if((err == ERROR_FILE_NOT_FOUND) || (err == ERROR_INVALID_PARAMETER) || (err == ERROR_PATH_NOT_FOUND) || (err == ERROR_INVALID_NAME))
+ if((err == ERROR_FILE_NOT_FOUND) ||
+ (err == ERROR_INVALID_PARAMETER) ||
+ (err == ERROR_PATH_NOT_FOUND) ||
+ (err == ERROR_INVALID_NAME) ||
+ (err == ERROR_ACCESS_DENIED))
return false; // GetFileAttributes failed because the path does not exist
// for any other error we assume the file does exist and fall through,
// this may not be the best policy though... (JM 20040330)