Salome HOME
[EDF30062] : Forward of current directory mecanism
[modules/kernel.git] / src / HDFPersist / HDFascii.cc
index 88259152ec0c5a20c08565ef496790ef0a8c9c91..7a0aa19e9f981e05f4b9dd8a7afa5962455861f0 100644 (file)
@@ -1,4 +1,4 @@
-// Copyright (C) 2007-2021  CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2024  CEA, EDF, OPEN CASCADE
 //
 // Copyright (C) 2003-2007  OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
 // CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
@@ -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