std::filesystem::path does not expect UTF-8 strings, so they must be converted to native format first (and back to utf-8 after.)
This commit is contained in:
@@ -245,7 +245,7 @@ static bool _ValidateSignatureFile(const std::string &filename)
|
||||
return false;
|
||||
}
|
||||
|
||||
std::string dirname = std::filesystem::path(filename).parent_path().string();
|
||||
std::string dirname = FS2OTTD(std::filesystem::path(OTTD2FS(filename)).parent_path());
|
||||
|
||||
for (auto &signature : signatures["files"]) {
|
||||
const std::string sig_filename = dirname + PATHSEPCHAR + signature["filename"].get<std::string>();
|
||||
|
||||
Reference in New Issue
Block a user