Changeset View
Changeset View
Standalone View
Standalone View
source/ps/ModInstaller.cpp
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | if (RenameFile(modTemp, modPath) != INFO::OK) | ||||
return FAIL_ON_MOD_MOVE; | return FAIL_ON_MOD_MOVE; | ||||
} | } | ||||
DeleteDirectory(modTemp.Parent()); | DeleteDirectory(modTemp.Parent()); | ||||
#if OS_WIN | #if OS_WIN | ||||
const std::filesystem::path modJsonPath = (modDir / L"mod.json").fileSystemPath(); | const std::filesystem::path modJsonPath = (modDir / L"mod.json").fileSystemPath(); | ||||
#else | #else | ||||
const char* modJsonPath = OsString(modDir / L"mod.json").c_str(); | const std::string modJsonPath = OsString(modDir / L"mod.json"); | ||||
#endif | #endif | ||||
std::ofstream mod_json(modJsonPath); | std::ofstream mod_json(modJsonPath); | ||||
if (mod_json.good()) | if (mod_json.good()) | ||||
{ | { | ||||
mod_json << modinfo.GetAsString(); | mod_json << modinfo.GetAsString(); | ||||
mod_json.close(); | mod_json.close(); | ||||
} | } | ||||
else | else | ||||
Show All 11 Lines |
Wildfire Games · Phabricator