2
0
mirror of https://github.com/AxioDL/metaforce.git synced 2025-12-08 21:07:42 +00:00

std::string allocating getcwd

This commit is contained in:
Jack Andersen
2015-12-15 11:55:50 -10:00
parent 4240c79b58
commit 05eda24a81
2 changed files with 48 additions and 14 deletions

View File

@@ -8,20 +8,6 @@ static const SystemRegex regGLOB(_S("\\*"), SystemRegex::ECMAScript|SystemRegex:
static const SystemRegex regPATHCOMP(_S("[/\\\\]*([^/\\\\]+)"), SystemRegex::ECMAScript|SystemRegex::optimize);
static const SystemRegex regDRIVELETTER(_S("^([^/]*)/"), SystemRegex::ECMAScript|SystemRegex::optimize);
static bool IsAbsolute(const SystemString& path)
{
#if WIN32
if (path.size() && (path[0] == _S('\\') || path[0] == _S('/')))
return true;
if (path.size() >= 2 && iswalpha(path[0]) && path[1] == _S(':'))
return true;
#else
if (path[0] == _S('/'))
return true;
#endif
return false;
}
static SystemString CanonRelPath(const SystemString& path)
{
/* Tokenize Path */