[*] Refactor FIOConfig::ddefaultBrand -> (AuOptional) FIOConfig::optDefaultBrand

[+] FIOConfig::bIsIntranetTrusted
This commit is contained in:
Reece Wilson 2023-08-29 21:10:53 +01:00
parent b5a452a43d
commit 47cec914cb
3 changed files with 9 additions and 9 deletions

View File

@ -275,9 +275,9 @@ namespace Aurora
struct FIOConfig
{
/// You can bypass branding by assigning an empty string to 'defaultBrand'
AuString defaultBrand = "Aurora SDK Sample";
AuOptional<AuString> optDefaultBrand = "Aurora SDK Sample";
bool bForceOverlappedUtilsToDelegatedThreadPool { false };
bool bIsIntranetTrusted {};
AuUInt32 uOverlappedUtilsThreadPoolSize { 2 }; // note: this does not relate to the overlapped aio apis
}; // these threads are only spawned as a fallback for AuFS::Overlapped*** apis

View File

@ -53,7 +53,7 @@ namespace Aurora::IO::FS
return !AuFS::FileExists(path);
}
return AuStringContains(content, "ZoneId=1\r\n") || // intranet
return (gRuntimeConfig.fio.bIsIntranetTrusted && AuStringContains(content, "ZoneId=1\r\n")) || // intranet
AuStringContains(content, "ZoneId=3\r\n") || // internet
AuStringContains(content, "ZoneId=4\r\n"); // untrusted
}

View File

@ -305,13 +305,13 @@ namespace Aurora::IO::FS
static void ChangeDir()
{
#if !defined(AU_NO_AU_HOME_BRANDING)
if (gRuntimeConfig.fio.defaultBrand.size())
if (gRuntimeConfig.fio.optDefaultBrand)
{
#if !defined(AURORA_PLATFORM_WIN32)
gApplicationData += "/" + gRuntimeConfig.fio.defaultBrand;
gApplicationData += "/" + gRuntimeConfig.fio.optDefaultBrand.value();
#endif
gHomeDirectory += "/" + gRuntimeConfig.fio.defaultBrand;
gProgramsFolder += "/" + gRuntimeConfig.fio.defaultBrand;
gHomeDirectory += "/" + gRuntimeConfig.fio.optDefaultBrand.value();
gProgramsFolder += "/" + gRuntimeConfig.fio.optDefaultBrand.value();
}
#endif
@ -327,9 +327,9 @@ namespace Aurora::IO::FS
}
#if defined(AURORA_PLATFORM_WIN32)
if (gRuntimeConfig.fio.defaultBrand.size())
if (gRuntimeConfig.fio.optDefaultBrand)
{
gApplicationData += "\\" + gRuntimeConfig.fio.defaultBrand;
gApplicationData += "\\" + gRuntimeConfig.fio.optDefaultBrand.value();
}
#endif