From: dmv Date: Wed, 15 Sep 2010 08:33:11 +0000 (+0000) Subject: Correct previous fix X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=fb5803c2445ef64e602ffb991fc4432d6efbd897;p=modules%2Fkernel.git Correct previous fix --- 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;