From: vsr Date: Wed, 26 Sep 2012 06:16:59 +0000 (+0000) Subject: Windows compatibility X-Git-Tag: V6_6_0a1~76 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=b86b991075ec0821e218364ce91a3023cbf3ea07;p=modules%2Fsmesh.git Windows compatibility --- diff --git a/src/SMESH_I/SMESH_Gen_i.cxx b/src/SMESH_I/SMESH_Gen_i.cxx index e505af693..5463bbc1f 100644 --- a/src/SMESH_I/SMESH_Gen_i.cxx +++ b/src/SMESH_I/SMESH_Gen_i.cxx @@ -118,6 +118,7 @@ #include #include #include +#include using namespace std; using SMESH::TPythonDump; @@ -1236,7 +1237,13 @@ SMESH_Gen_i::CreateMeshesFromGMF( const char* theFileName, Unexpect aCatch(SALOME_SalomeException); SMESH::SMESH_Mesh_var aMesh = createMesh(); +#ifdef WIN32 + char bname[ _MAX_FNAME ]; + _splitpath( theFileName, NULL, NULL, bname, NULL ); + string aFileName = bname; +#else string aFileName = basename( theFileName ); +#endif // publish mesh in the study if ( CanPublishInStudy( aMesh ) ) { SALOMEDS::StudyBuilder_var aStudyBuilder = myCurrentStudy->NewBuilder();