[*] AuPaths finish up cleanup
This commit is contained in:
parent
9c86d1c899
commit
2fd41d4142
@ -190,7 +190,6 @@ namespace Aurora::Process
|
||||
{
|
||||
static AuString cachedModule, cachedPartialPath, cachedFullPath;
|
||||
static AuInitOnce gInitOnce;
|
||||
static bool bFailed {};
|
||||
|
||||
if (!AuThreading::InitOnceLocker::TryLock(&gInitOnce, true))
|
||||
{
|
||||
@ -198,6 +197,8 @@ namespace Aurora::Process
|
||||
}
|
||||
else
|
||||
{
|
||||
bool bFailed {};
|
||||
|
||||
try
|
||||
{
|
||||
char spitter;
|
||||
@ -209,16 +210,16 @@ namespace Aurora::Process
|
||||
{
|
||||
cachedModule = cachedFullPath.substr(indexA + 1);
|
||||
cachedPartialPath = cachedFullPath.substr(0, indexA);
|
||||
|
||||
if (!cachedPartialPath.ends_with(AuFS::kPathSplitter))
|
||||
{
|
||||
cachedPartialPath += AuFS::kPathSplitter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
bFailed = true;
|
||||
}
|
||||
|
||||
if (!cachedPartialPath.ends_with(AuFS::kPathSplitter))
|
||||
{
|
||||
cachedPartialPath += AuFS::kPathSplitter;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -234,7 +235,7 @@ namespace Aurora::Process
|
||||
AuThreading::InitOnceLocker::Finish(&gInitOnce, bFailed);
|
||||
}
|
||||
|
||||
if (bFailed)
|
||||
if (gInitOnce.IsUninitialized())
|
||||
{
|
||||
return false;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user