From 9866cae4ff3486267dafbf7555685eb530d5d208 Mon Sep 17 00:00:00 2001 From: Shawn Hoffman Date: Thu, 23 Feb 2012 12:48:54 -0800 Subject: [PATCH] net: create directory for config file if it doesn't exist. --- Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h index 11e100c837..5714ae8099 100644 --- a/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h +++ b/Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h @@ -168,6 +168,15 @@ public: void WriteConfig() { + if (!File::Exists(path)) + { + if (!File::CreateFullPath( + std::string(File::GetUserPath(D_WIISYSCONF_IDX) + "net/02/"))) + { + ERROR_LOG(WII_IPC_NET, "Failed to create directory for network config file"); + } + } + File::IOFile(path, "wb").WriteBytes((void*)&config, sizeof(config)); }