]> SALOME platform Git repositories - modules/smesh.git/commitdiff
Salome HOME
Windows compatibility
authorvsr <vsr@opencascade.com>
Wed, 26 Sep 2012 06:16:59 +0000 (06:16 +0000)
committervsr <vsr@opencascade.com>
Wed, 26 Sep 2012 06:16:59 +0000 (06:16 +0000)
src/SMESH_I/SMESH_Gen_i.cxx

index e505af6934aa4f7a948a9b37b2f0b70206b9a2e0..5463bbc1f5e74b267932203b81753f920fbf7a51 100644 (file)
 #include <map>
 #include <fstream>
 #include <cstdio>
+#include <stdlib.h>
 
 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();