Workaround: Replace use of std::filesystem in signature.cpp

Creates DWARF generation problem with LTO and -g1 on MinGW
This commit is contained in:
Jonathan G Rennison 2024-02-24 14:54:53 +00:00
parent 0978bd18bf
commit 64be289942

View File

@ -20,8 +20,6 @@
#include "3rdparty/monocypher/monocypher-ed25519.h"
#include "3rdparty/nlohmann/json.hpp"
#include <filesystem>
#include "safeguards.h"
/** The public keys used for signature validation. */
@ -247,7 +245,13 @@ static bool _ValidateSignatureFile(const std::string &filename)
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"]) {
const std::string sig_filename = dirname + PATHSEPCHAR + signature["filename"].get<std::string>();