From fb5803c2445ef64e602ffb991fc4432d6efbd897 Mon Sep 17 00:00:00 2001 From: dmv Date: Wed, 15 Sep 2010 08:33:11 +0000 Subject: [PATCH] Correct previous fix --- src/HDFPersist/HDFascii.cc | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 1bc9c8a1e..954ca3d2b 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -768,7 +768,11 @@ void read_float64(FILE* fp, hdf_float64* value) bool Exists(const std::string thePath) { #ifdef WIN32 - return (GetFileAttributes( thePath.c_str() ) != 0xFFFFFFFF); + if ( GetFileAttributes ( thePath.c_str() ) == 0xFFFFFFFF ) { + DWORD errorId = GetLastError (); + if ( errorId == ERROR_FILE_NOT_FOUND || errorId == ERROR_PATH_NOT_FOUND ) + return false; + } #else int status = access ( thePath.c_str() , F_OK ); if (status != 0) return false; -- 2.39.2