From 1f77be94c4ae03bc4bfa8571a43565700557a645 Mon Sep 17 00:00:00 2001 From: Nabil Ghodbane Date: Wed, 10 May 2023 16:39:25 +0200 Subject: [PATCH] [CEA][Windows] if study from Most Recently Used studies is not present, SALOME crashes --- src/HDFPersist/HDFascii.cc | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/HDFPersist/HDFascii.cc b/src/HDFPersist/HDFascii.cc index 53a316706..188f3c8f9 100644 --- a/src/HDFPersist/HDFascii.cc +++ b/src/HDFPersist/HDFascii.cc @@ -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 -- 2.39.2