Skip to content

Commit a40afa5

Browse files
Remove unused configurationLoaded field.
The configLoaded flag was not updated at the appropriate moment.
1 parent b397e6f commit a40afa5

File tree

2 files changed

+8
-5
lines changed

2 files changed

+8
-5
lines changed

dotnet/src/dotnetframework/GxClasses/Core/GXApplication.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,6 @@ internal class GxApplication
320320
public class GxContext : IGxContext
321321
{
322322
private static IGXLogger log = null;
323-
internal static bool configurationLoaded = Config.configLoaded;
324323
internal static string GX_SPA_REQUEST_HEADER = "X-SPA-REQUEST";
325324
internal static string GX_SPA_REDIRECT_URL = "X-SPA-REDIRECT-URL";
326325
internal const string GXLanguage = "GXLanguage";

dotnet/src/dotnetframework/GxClasses/Core/gxconfig.cs

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -533,14 +533,15 @@ static NameValueCollection config
533533
{
534534
loadedConfigFile = configFileName;
535535
_config = loadConfig(configFileName, out logConfigSource);
536+
configLoaded = true;
536537
if (!string.IsNullOrEmpty(logConfigSource))
537538
logConfig(logConfigSource, out configuredFilename);
538539
else
539540
logConfig(configFileName, out configuredFilename);
540541
}
542+
#if !NETCORE
541543
else
542544
{
543-
#if !NETCORE
544545
if (GxContext.IsHttpContext &&
545546
File.Exists(Path.Combine(GxContext.StaticPhysicalPath(), "web.config")))
546547
{
@@ -576,10 +577,13 @@ static NameValueCollection config
576577
logConfig(logFile, out configuredFilename);
577578
loadedConfigFile = Path.GetFullPath(file);
578579
_config = loadConfig(file);
579-
580580
}
581-
581+
configLoaded = true;
582+
}
582583
#else
584+
else
585+
{
586+
583587
string basePath = FileUtil.GetBasePath();
584588
string currentDir = Directory.GetCurrentDirectory();
585589
string startupDir = FileUtil.GetStartupDirectory();
@@ -635,8 +639,8 @@ static NameValueCollection config
635639
{
636640
//"Could not register encoding provider";
637641
}
638-
#endif
639642
}
643+
#endif
640644
}
641645
}
642646
log = GXLoggerFactory.GetLogger<Config>();

0 commit comments

Comments
 (0)