2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 17:04:55 +00:00

Glob path fixes

This commit is contained in:
Jack Andersen
2016-09-20 19:41:06 -10:00
parent f1fcd83824
commit f6428c9407
2 changed files with 12 additions and 23 deletions

View File

@@ -139,16 +139,10 @@ bool IsPathPNG(const hecl::ProjectPath& path)
bool IsPathBlend(const hecl::ProjectPath& path)
{
hecl::ProjectPath usePath;
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
usePath = path.getWithExtension(_S(".blend"), true);
else
usePath = path;
const SystemChar* lastCompExt = usePath.getLastComponentExt();
const SystemChar* lastCompExt = path.getLastComponentExt();
if (!lastCompExt || hecl::StrCmp(lastCompExt, _S("blend")))
return false;
FILE* fp = hecl::Fopen(usePath.getAbsolutePath().c_str(), _S("rb"));
FILE* fp = hecl::Fopen(path.getAbsolutePath().c_str(), _S("rb"));
if (!fp)
return false;
uint32_t buf;