diff --git a/Include/Aurora/Runtime.hpp b/Include/Aurora/Runtime.hpp index a7eb3765..ad281c5b 100644 --- a/Include/Aurora/Runtime.hpp +++ b/Include/Aurora/Runtime.hpp @@ -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 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 diff --git a/Source/IO/FS/FileTrust.NT.cpp b/Source/IO/FS/FileTrust.NT.cpp index 6f099a03..46d3ef24 100644 --- a/Source/IO/FS/FileTrust.NT.cpp +++ b/Source/IO/FS/FileTrust.NT.cpp @@ -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 } diff --git a/Source/IO/FS/Resources.cpp b/Source/IO/FS/Resources.cpp index 97113ad2..b6021adc 100644 --- a/Source/IO/FS/Resources.cpp +++ b/Source/IO/FS/Resources.cpp @@ -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