-// Copyright (C) 2007-2020 CEA/DEN, EDF R&D, OPEN CASCADE
+// Copyright (C) 2007-2021 CEA/DEN, EDF R&D, OPEN CASCADE
//
// Copyright (C) 2003-2007 OPEN CASCADE, EADS/CCR, LIP6, CEA/DEN,
// CEDRAT, EDF R&D, LEG, PRINCIPIA R&D, BUREAU VERITAS
xmlPath += sep + plugin + ".xml";
bool fileOK;
#ifdef WIN32
- #ifdef UNICODE
+# ifdef UNICODE
const wchar_t* path = Kernel_Utils::decode_s(xmlPath);
- #else
+ SMESHUtils::ArrayDeleter<const wchar_t> deleter( path );
+# else
const char* path = xmlPath.c_str();
- #endif
-
+# endif
fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
- #ifdef UNICODE
- delete path;
- #endif
-
#else
fileOK = (access(xmlPath.c_str(), F_OK) == 0);
#endif