diff --git a/Core/Config.cpp b/Core/Config.cpp index aa62b14d08..a0d7e7107b 100644 --- a/Core/Config.cpp +++ b/Core/Config.cpp @@ -53,6 +53,7 @@ #include "Core/ConfigValues.h" #include "Core/Loaders.h" #include "Core/KeyMap.h" +#include "Core/System.h" #include "Core/HLE/sceUtility.h" #include "Core/Instance.h" #include "GPU/Common/FramebufferManagerCommon.h" @@ -1679,7 +1680,9 @@ const Path Config::FindConfigFile(const std::string &baseFilename) { Path parent = filename.NavigateUp(); // We try to create the path and ignore if it fails (already exists). - File::CreateFullPath(parent); + if (parent != GetSysDirectory(DIRECTORY_SYSTEM)) { + File::CreateFullPath(parent); + } return filename; } diff --git a/Windows/main.cpp b/Windows/main.cpp index 50b20cd3a2..2092900862 100644 --- a/Windows/main.cpp +++ b/Windows/main.cpp @@ -838,10 +838,8 @@ static void InitMemstickDirectory() { // We're screwed anyway if we can't write to Documents, or can't detect it. if (!File::CreateEmptyFile(testFile)) g_Config.memStickDirectory = myDocsPath; - // Clean up our mess. - if (File::Exists(testFile)) - File::Delete(testFile); + File::Delete(testFile); } static void WinMainInit() {