diff options
| author | Shawn Hoffman <godisgovernment@gmail.com> | 2012-02-23 12:48:54 -0800 |
|---|---|---|
| committer | Shawn Hoffman <godisgovernment@gmail.com> | 2012-02-23 12:48:54 -0800 |
| commit | 9866cae4ff3486267dafbf7555685eb530d5d208 (patch) | |
| tree | cb691d961af88806ec10be6ea42efcb9c0496721 /Source/Core | |
| parent | f73c82c232480a65326734e794134d7429343cfb (diff) | |
net: create directory for config file if it doesn't exist.
Diffstat (limited to 'Source/Core')
| -rw-r--r-- | Source/Core/Core/Src/IPC_HLE/WII_IPC_HLE_Device_net.h | 9 |
1 files changed, 9 insertions, 0 deletions
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)); } |
