]> SALOME platform Git repositories - modules/kernel.git/blobdiff - src/HDFPersist/HDFascii.cc
Salome HOME
[CEA][Windows] if study from Most Recently Used studies is not present, SALOME crashes
[modules/kernel.git] / src / HDFPersist / HDFascii.cc
index 53a31670669350ead705b0ef9426533e7786340e..188f3c8f99bc7429701acb0d32e95332eade8c43 100644 (file)
@@ -90,7 +90,8 @@ bool HDFascii::isASCII(const char* thePath) {
   int fd;
 #if defined(WIN32) && defined(UNICODE)
   const wchar_t * aPath = Kernel_Utils::utf8_decode(thePath);
-  if (!(fd = _wopen(aPath, O_RDONLY))) return false;
+  fd = _wopen(aPath, O_RDONLY);
+  if (fd == -1) return false;
 #else
   if(!(fd = open(thePath, O_RDONLY))) return false;
 #endif