]> SALOME platform Git repositories - modules/kernel.git/commitdiff
Salome HOME
[CEA][Windows] if study from Most Recently Used studies is not present, SALOME crashes bos/35175 V9_11_0b1 4/head
authorNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 10 May 2023 14:39:25 +0000 (16:39 +0200)
committerNabil Ghodbane <nabil.ghodbane@cea.fr>
Wed, 10 May 2023 14:39:25 +0000 (16:39 +0200)
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