Merge branch 'rnv/unicode'

This commit is contained in:
rnv 2018-10-10 23:34:39 +03:00
commit d2be83be3a
2 changed files with 8 additions and 1 deletions

View File

@ -55,7 +55,11 @@ namespace MED
#else #else
cosnt char* path = xmlPath.c_str(); cosnt char* path = xmlPath.c_str();
#endif #endif
return (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES); bool res = (GetFileAttributes(path) != INVALID_FILE_ATTRIBUTES);
#ifdef UNICODE
delete path;
#endif
return res;
#else #else
return (access(fileName.c_str(), F_OK) == 0); return (access(fileName.c_str(), F_OK) == 0);
#endif #endif

View File

@ -534,6 +534,9 @@ namespace SMESH
char* path = baPath.data(); char* path = baPath.data();
#endif #endif
LibHandle libHandle = LoadLib( path ); LibHandle libHandle = LoadLib( path );
#if defined(WIN32) && defined(UNICODE)
delete path;
#endif
if (!libHandle) { if (!libHandle) {
// report any error, if occurred // report any error, if occurred
{ {