fix(relinker): skip generated guest prx files during sce module scan
This commit is contained in:
parent
e526f1f528
commit
52b683d208
|
|
@ -7,6 +7,8 @@
|
|||
|
||||
namespace Relinker {
|
||||
|
||||
inline constexpr char GuestModuleSuffix[] = ".guest.prx";
|
||||
|
||||
struct GuestSymbol {
|
||||
std::string Name;
|
||||
std::uint8_t Info;
|
||||
|
|
|
|||
|
|
@ -27,7 +27,7 @@ GuestImage GuestImageReader::Read(const std::filesystem::path& path, std::vector
|
|||
range(Io::ReadU64(bytes, 32), static_cast<std::uint64_t>(Io::ReadU16(bytes, 56)) * 56);
|
||||
GuestImage image;
|
||||
image.SourcePath = path;
|
||||
image.OutputName = path.filename().string() + ".guest.prx";
|
||||
image.OutputName = path.filename().string() + GuestModuleSuffix;
|
||||
image.Headers = ElfReader(bytes).ReadProgramHeaders();
|
||||
const Domain::ProgramHeader* dynamic = nullptr;
|
||||
const Domain::ProgramHeader* dynlib = nullptr;
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ std::vector<GuestArtifact> GuestModuleBuilder::Build(const std::filesystem::path
|
|||
if (!std::filesystem::is_directory(directory)) throw Domain::RelinkerException("Guest module path is not a directory: " + directory.string());
|
||||
std::vector<std::filesystem::path> paths;
|
||||
for (const auto& entry : std::filesystem::directory_iterator(directory)) {
|
||||
if (entry.path().filename().string().ends_with(GuestModuleSuffix)) continue;
|
||||
if (!entry.is_regular_file()) continue;
|
||||
std::ifstream stream(entry.path(), std::ios::binary);
|
||||
if (!stream) throw Domain::RelinkerException("Cannot read guest candidate: " + entry.path().string());
|
||||
|
|
|
|||
Loading…
Reference in New Issue