Fix compilation problem on Debian Sarge

This commit is contained in:
vsr 2010-03-15 09:31:54 +00:00
parent 8baf98a974
commit e2018c0393

View File

@ -7,6 +7,7 @@
#include "utilities.h" #include "utilities.h"
#include <OSD_File.hxx> #include <OSD_File.hxx>
#include <OSD_Path.hxx>
#include <Standard_ProgramError.hxx> #include <Standard_ProgramError.hxx>
#include <Standard_ErrorHandler.hxx> #include <Standard_ErrorHandler.hxx>
#include <Standard_Failure.hxx> #include <Standard_Failure.hxx>
@ -125,7 +126,8 @@ bool SMESH_File::remove()
{ {
close(); close();
try { try {
OSD_File( TCollection_AsciiString((char*)_name.data()) ).Remove(); OSD_Path filePath(TCollection_AsciiString((char*)_name.data()));
OSD_File(filePath).Remove();
} }
catch ( Standard_ProgramError ) { catch ( Standard_ProgramError ) {
MESSAGE("Can't remove file: " << _name << " ; file does not exist or permission denied"); MESSAGE("Can't remove file: " << _name << " ; file does not exist or permission denied");