mirror of
https://github.com/JGRennison/OpenTTD-patches.git
synced 2024-10-31 15:20:10 +00:00
Workaround: Replace use of std::filesystem in signature.cpp
Creates DWARF generation problem with LTO and -g1 on MinGW
This commit is contained in:
parent
0978bd18bf
commit
64be289942
@ -20,8 +20,6 @@
|
|||||||
#include "3rdparty/monocypher/monocypher-ed25519.h"
|
#include "3rdparty/monocypher/monocypher-ed25519.h"
|
||||||
#include "3rdparty/nlohmann/json.hpp"
|
#include "3rdparty/nlohmann/json.hpp"
|
||||||
|
|
||||||
#include <filesystem>
|
|
||||||
|
|
||||||
#include "safeguards.h"
|
#include "safeguards.h"
|
||||||
|
|
||||||
/** The public keys used for signature validation. */
|
/** The public keys used for signature validation. */
|
||||||
@ -247,7 +245,13 @@ static bool _ValidateSignatureFile(const std::string &filename)
|
|||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
|
|
||||||
std::string dirname = std::filesystem::path(filename).parent_path().string();
|
std::string dirname;
|
||||||
|
auto pos = filename.rfind(PATHSEPCHAR);
|
||||||
|
if (pos == std::string::npos || pos == 0) {
|
||||||
|
dirname = filename;
|
||||||
|
} else {
|
||||||
|
dirname = filename.substr(0, pos);
|
||||||
|
}
|
||||||
|
|
||||||
for (auto &signature : signatures["files"]) {
|
for (auto &signature : signatures["files"]) {
|
||||||
const std::string sig_filename = dirname + PATHSEPCHAR + signature["filename"].get<std::string>();
|
const std::string sig_filename = dirname + PATHSEPCHAR + signature["filename"].get<std::string>();
|
||||||
|
Loading…
Reference in New Issue
Block a user