X-Git-Url: http://git.salome-platform.org/gitweb/?a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_File.cxx;h=556212201577637d642265fd613a4cc9ecde78b8;hb=b9c863fcfc102826d86a838fb91c955ebc87b694;hp=fd3daf555c0f3209d713feacf35a55971e25e68c;hpb=c98d9fcd7f02c1f1f5c24dd3e709ed75228d66c4;p=modules%2Fsmesh.git diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index fd3daf555..556212201 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -75,7 +75,7 @@ SMESH_File::~SMESH_File() bool SMESH_File::open() { - int length = size(); + long length = size(); if ( !_map && length > 0 ) { #ifdef WIN32 @@ -188,7 +188,7 @@ long SMESH_File::size() boost::uintmax_t size = boofs::file_size( _name, err ); _error = err.message(); - return err ? -1 : (long) size; + return !err ? (long) size : -1; } //================================================================================