X-Git-Url: http://git.salome-platform.org/gitweb/?p=modules%2Fsmesh.git;a=blobdiff_plain;f=src%2FSMESHUtils%2FSMESH_File.cxx;h=556212201577637d642265fd613a4cc9ecde78b8;hp=10c1f533f1d4a238613f739a18aa51a1233d453c;hb=8d3d2084b73d927b857e77ae17ca62e0d74e090a;hpb=59627b07d70f4caa4c768be6805334d2610fa54c diff --git a/src/SMESHUtils/SMESH_File.cxx b/src/SMESHUtils/SMESH_File.cxx index 10c1f533f..556212201 100644 --- a/src/SMESHUtils/SMESH_File.cxx +++ b/src/SMESHUtils/SMESH_File.cxx @@ -1,4 +1,4 @@ -// Copyright (C) 2007-2015 CEA/DEN, EDF R&D, OPEN CASCADE +// Copyright (C) 2007-2016 CEA/DEN, EDF R&D, OPEN CASCADE // // This library is free software; you can redistribute it and/or // modify it under the terms of the GNU Lesser General Public @@ -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; } //================================================================================