Issue 0016760: Fix pb in zero size of MED file

This commit is contained in:
vsr 2008-06-09 07:08:28 +00:00
parent bfc5148139
commit ad8625f0e3

View File

@ -72,6 +72,7 @@
#include <string>
#include <iostream>
#include <sstream>
#include <sys/stat.h>
#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;