As I state in the ChangeLog, this fix is good enough for us. The Boost
people are talking about rewriting the function entirely.

OK?

-- 
Angus
Index: boost/ChangeLog
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/ChangeLog,v
retrieving revision 1.55
diff -u -p -r1.55 ChangeLog
--- boost/ChangeLog	30 Sep 2005 09:44:37 -0000	1.55
+++ boost/ChangeLog	30 Sep 2005 12:30:48 -0000
@@ -1,5 +1,15 @@
 2005-09-30  Angus Leeming  <[EMAIL PROTECTED]>
 
+	* 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  <[EMAIL PROTECTED]>
+
 	* 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
Index: boost/libs/filesystem/src/operations_posix_windows.cpp
===================================================================
RCS file: /usr/local/lyx/cvsroot/lyx-devel/boost/libs/filesystem/src/operations_posix_windows.cpp,v
retrieving revision 1.4
diff -u -p -r1.4 operations_posix_windows.cpp
--- boost/libs/filesystem/src/operations_posix_windows.cpp	30 Sep 2005 09:44:37 -0000	1.4
+++ boost/libs/filesystem/src/operations_posix_windows.cpp	30 Sep 2005 12:30:52 -0000
@@ -369,7 +369,11 @@ namespace boost
       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)

Reply via email to