- Fixed config file being overriden when it's blocked by another application.

This commit is contained in:
drfrag 2020-11-17 21:04:23 +01:00
parent bd18250672
commit b92759eca3

View file

@ -41,6 +41,9 @@
#include "files.h" #include "files.h"
#include "m_random.h" #include "m_random.h"
#include "filesystem.h"
#include "doomerrors.h"
#define READBUFFERSIZE 256 #define READBUFFERSIZE 256
static FRandom pr_endtag; static FRandom pr_endtag;
@ -605,10 +608,13 @@ void FConfigFile::LoadConfigFile ()
FileReader file; FileReader file;
bool succ; bool succ;
if (!FileExists(PathName))
FileExisted = false; FileExisted = false;
if (!file.OpenFile (PathName)) if (!file.OpenFile (PathName))
{ {
return; if (!FileExisted) return;
else I_Error ("Could not Open Config file.\n");
} }
succ = ReadConfig (&file); succ = ReadConfig (&file);