From c0ad0cc497047d711f6ee76b258e34be1168ba6f Mon Sep 17 00:00:00 2001 From: drfrag Date: Tue, 17 Nov 2020 21:04:23 +0100 Subject: [PATCH] - Fixed config file being overriden when it's blocked by another application. --- src/common/utility/configfile.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/src/common/utility/configfile.cpp b/src/common/utility/configfile.cpp index 52bb4bcae00..b92d4e44279 100644 --- a/src/common/utility/configfile.cpp +++ b/src/common/utility/configfile.cpp @@ -39,6 +39,9 @@ #include "configfile.h" #include "files.h" +#include "cmdlib.h" +#include "engineerrors.h" + #define READBUFFERSIZE 256 //==================================================================== @@ -601,10 +604,14 @@ void FConfigFile::LoadConfigFile () FileReader file; bool succ; - FileExisted = false; + FileExisted = FileExists(PathName.GetChars()); + if (!file.OpenFile (PathName)) { - return; + if (!FileExisted) + return; + else + I_Error ("Could not open config file.\n"); } succ = ReadConfig (&file);