Fix file-extension check for X3D-files
using the pre-existing and well-tested GetExtension() (which happens to also normalize the extension), rather than attempting our own buggy one... Closes: https://github.com/assimp/assimp/issues/4177pull/4217/head
parent
8c9a148776
commit
836963428e
|
@ -235,10 +235,8 @@ void X3DImporter::ParseFile(const std::string &file, IOSystem *pIOHandler) {
|
||||||
|
|
||||||
bool X3DImporter::CanRead(const std::string &pFile, IOSystem * /*pIOHandler*/, bool checkSig) const {
|
bool X3DImporter::CanRead(const std::string &pFile, IOSystem * /*pIOHandler*/, bool checkSig) const {
|
||||||
if (checkSig) {
|
if (checkSig) {
|
||||||
std::string::size_type pos = pFile.find_last_of(".x3d");
|
if (GetExtension(pFile) == "x3d")
|
||||||
if (pos != std::string::npos) {
|
|
||||||
return true;
|
return true;
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return false;
|
return false;
|
||||||
|
|
Loading…
Reference in New Issue