From: vsr Date: Mon, 9 Jun 2008 07:08:28 +0000 (+0000) Subject: Issue 0016760: Fix pb in zero size of MED file X-Git-Tag: V4_1_3~4 X-Git-Url: http://git.salome-platform.org/gitweb/?a=commitdiff_plain;h=ad8625f0e34ed8adca8cb9abefdaf20d234853ce;p=modules%2Fsmesh.git Issue 0016760: Fix pb in zero size of MED file --- diff --git a/src/SMESH_I/SMESH_Mesh_i.cxx b/src/SMESH_I/SMESH_Mesh_i.cxx index a58c5ad0e..a5d5ae2ec 100644 --- a/src/SMESH_I/SMESH_Mesh_i.cxx +++ b/src/SMESH_I/SMESH_Mesh_i.cxx @@ -72,6 +72,7 @@ #include #include #include +#include #ifdef _DEBUG_ static int MYDEBUG = 0; @@ -266,6 +267,14 @@ SMESH_Mesh_i::ImportMEDFile( const char* theFileName, const char* theMeshName ) myFileInfo = new SALOME_MED::MedFileInfo(); myFileInfo->fileName = theFileName; myFileInfo->fileSize = 0; +#ifdef WIN32 + struct _stati64 d; + if ( ::_stati64( theFileName, &d ) != -1 ) +#else + struct stat64 d; + if ( ::stat64( theFileName, &d ) != -1 ) +#endif + myFileInfo->fileSize = d.st_size; myFileInfo->major = major; myFileInfo->minor = minor; myFileInfo->release = release;