closes https://github.com/assimp/assimp/issues/1621: add file check for dxf file without extensions.
This commit is contained in:
@@ -119,9 +119,14 @@ DXFImporter::~DXFImporter()
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
// Returns whether the class can handle the format of the given file.
|
||||
bool DXFImporter::CanRead( const std::string& pFile, IOSystem* /*pIOHandler*/, bool /*checkSig*/) const
|
||||
bool DXFImporter::CanRead( const std::string& pFile, IOSystem* pIOHandler, bool checkSig ) const
|
||||
{
|
||||
return SimpleExtensionCheck(pFile,"dxf");
|
||||
if ( checkSig ) {
|
||||
return SimpleExtensionCheck(pFile,"dxf");
|
||||
} else {
|
||||
static const char *pTokens[] = { "SECTION", "HEADER", "ENDSEC", "BLOCKS" };
|
||||
return BaseImporter::SearchFileHeaderForToken(pIOHandler, pFile, pTokens, 4 );
|
||||
}
|
||||
}
|
||||
|
||||
// ------------------------------------------------------------------------------------------------
|
||||
|
||||
Reference in New Issue
Block a user