Skip to content
Snippets Groups Projects
Commit f4324754 authored by Thomas Feuvrier's avatar Thomas Feuvrier
Browse files

Ajout test dans le CanRead : si le filename est un répertoire, return false.

parent aac1da37
Branches
Tags
No related merge requests found
......@@ -90,6 +90,11 @@ bool ONERAImageIO::CanReadFile( const char* FileNameToRead )
m_Headerfile.close();
}
if( System::IsADirName(filename) == true )
{
return false;
}
const std::string HeaderFileName = System::GetRootName(filename)+".ent";
const std::string DataFileName = System::GetRootName(filename)+".dat";
......@@ -119,11 +124,11 @@ bool ONERAImageIO::CanReadFile( const char* FileNameToRead )
{
if ( m_ByteOrder == LittleEndian )
{
m_FileByteOrder = BigEndian;
m_FileByteOrder = BigEndian;
}
else if ( m_ByteOrder == BigEndian )
{
m_FileByteOrder = LittleEndian;
m_FileByteOrder = LittleEndian;
}
}
// Swap if necessary
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment