1
0
forked from 0ad/0ad
Reported by: @Langbart
Accepted by: @Vladislavbelov
Tested by: @Langbart
Fixes: #6603
Differential Revision: https://code.wildfiregames.com/D4765
This was SVN commit r27058.
This commit is contained in:
Stan 2022-08-16 14:57:28 +00:00
parent ab16e60afa
commit e947dcb23c
2 changed files with 2 additions and 2 deletions

View File

@ -59,7 +59,7 @@ bool LoadModJSON(const PIVFS& vfs, OsPath modsPath, OsPath mod, std::string& tex
#if OS_WIN #if OS_WIN
const std::filesystem::path modJsonPath = (modsPath / mod / L"mod.json").fileSystemPath(); const std::filesystem::path modJsonPath = (modsPath / mod / L"mod.json").fileSystemPath();
#else #else
const char* modJsonPath = OsString(modsPath / mod / L"mod.json").c_str(); const std::string modJsonPath = OsString(modsPath / mod / L"mod.json");
#endif #endif
// Attempt to open mod.json first. // Attempt to open mod.json first.
std::ifstream modjson(modJsonPath); std::ifstream modjson(modJsonPath);

View File

@ -118,7 +118,7 @@ CModInstaller::ModInstallationResult CModInstaller::Install(
#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())