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:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user