Fix mod installation in non latin folders. Use OSString for consistency.

Refs e7ab22286e
Refs 880a797ce0
Refs 404e1a9a4a
Refs 52baaa4bbd

This was SVN commit r27055.
This commit is contained in:
Stan
2022-08-14 17:55:08 +00:00
parent 880a797ce0
commit c9dc8676a6
3 changed files with 24 additions and 4 deletions
+6 -1
View File
@@ -33,6 +33,11 @@
#include "scriptinterface/ScriptExceptions.h"
#include "scriptinterface/ScriptInterface.h"
#if !OS_WIN
#include "lib/os_path.h"
#include "lib/path.h"
#endif
#include <algorithm>
#include <boost/algorithm/string/split.hpp>
#include <boost/algorithm/string/classification.hpp>
@@ -55,7 +60,7 @@ bool LoadModJSON(const PIVFS& vfs, OsPath modsPath, OsPath mod, std::string& tex
#if OS_WIN
const std::filesystem::path modJsonPath = (modsPath / mod / L"mod.json").fileSystemPath();
#else
const std::string modJsonPath = (modsPath / mod / L"mod.json").string8();
const Path::String modJsonPath = OsString(modsPath / mod / L"mod.json").c_str();
#endif
// Attempt to open mod.json first.
std::ifstream modjson(modJsonPath);