From ad8625f0e34ed8adca8cb9abefdaf20d234853ce Mon Sep 17 00:00:00 2001 From: vsr Date: Mon, 9 Jun 2008 07:08:28 +0000 Subject: [PATCH] Issue 0016760: Fix pb in zero size of MED file --- src/SMESH_I/SMESH_Mesh_i.cxx | 9 +++++++++ 1 file changed, 9 insertions(+) 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; -- 2.39.2