From f69c19dc5c9e4f7b87f2e032c6075ae252c8fcf8 Mon Sep 17 00:00:00 2001 From: John Maddock Date: Sat, 5 Jun 2004 11:52:22 +0000 Subject: [PATCH] Added fix for when the filename syntax is invalid. [SVN r23033] --- src/operations_posix_windows.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/operations_posix_windows.cpp b/src/operations_posix_windows.cpp index 15cb3be..2c6e220 100644 --- a/src/operations_posix_windows.cpp +++ b/src/operations_posix_windows.cpp @@ -321,10 +321,12 @@ namespace boost # else if(::GetFileAttributesA( ph.string().c_str() ) == 0xFFFFFFFF) { - if((::GetLastError() == ERROR_FILE_NOT_FOUND) || (::GetLastError() == ERROR_PATH_NOT_FOUND)) + UINT err = ::GetLastError(); + if((err == ERROR_FILE_NOT_FOUND) || (err == ERROR_PATH_NOT_FOUND) || (err == ERROR_INVALID_NAME)) 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) + return true; } return true; # endif