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

Refinements to avoid bad level linkages

This commit is contained in:
Jack Andersen
2016-09-18 13:46:49 -10:00
parent a0470a3ef5
commit 6de25c1d1d
24 changed files with 137 additions and 44 deletions

View File

@@ -23,7 +23,7 @@ namespace hecl
{
unsigned VerbosityLevel = 0;
logvisor::Module LogModule("hecl");
static const std::string Illegals {"<>?*\"|"};
static const std::string Illegals {"<>?\"|"};
void SanitizePath(std::string& path)
{
@@ -139,10 +139,16 @@ bool IsPathPNG(const hecl::ProjectPath& path)
bool IsPathBlend(const hecl::ProjectPath& path)
{
const SystemChar* lastCompExt = path.getLastComponentExt();
hecl::ProjectPath usePath;
if (path.getPathType() == hecl::ProjectPath::Type::Glob)
usePath = path.getWithExtension(_S(".blend"), true);
else
usePath = path;
const SystemChar* lastCompExt = usePath.getLastComponentExt();
if (!lastCompExt || hecl::StrCmp(lastCompExt, _S("blend")))
return false;
FILE* fp = hecl::Fopen(path.getAbsolutePath().c_str(), _S("rb"));
FILE* fp = hecl::Fopen(usePath.getAbsolutePath().c_str(), _S("rb"));
if (!fp)
return false;
uint32_t buf;