X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESH%2FSMESH_Gen.cxx;h=574d4b3dedba14709fe847a3806a3c72378678d1;hb=c5f8cda9bf008812f728073dd5cc04f6c5082bbb;hp=4b5814c1f1244ca09eb9afce4d8c3475c5405194;hpb=00bd895f4432dd67f39c9f4e5066bfdc2f337a24;p=modules%2Fsmesh.git diff --git a/src/SMESH/SMESH_Gen.cxx b/src/SMESH/SMESH_Gen.cxx index 4b5814c1f..574d4b3de 100644 --- a/src/SMESH/SMESH_Gen.cxx +++ b/src/SMESH/SMESH_Gen.cxx @@ -52,6 +52,8 @@ #include #endif +#include + using namespace std; //============================================================================= @@ -1029,7 +1031,15 @@ std::vector< std::string > SMESH_Gen::GetPluginXMLPaths() xmlPath += sep + plugin + ".xml"; bool fileOK; #ifdef WIN32 - fileOK = (GetFileAttributes(xmlPath.c_str()) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + const wchar_t* path = Kernel_Utils::decode_s(xmlPath); +#else + const char* path = xmlPath.c_str(); +#endif + fileOK = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES); +#ifdef UNICODE + delete path; +#endif #else fileOK = (access(xmlPath.c_str(), F_OK) == 0); #endif