[keel] Make buildUuidMap only read the first 40 bytes of each file
This commit is contained in:
parent
d45ff05bcd
commit
8b22a8f339
@ -53,10 +53,12 @@ static ox::Error buildUuidMap(Context &ctx, ox::StringViewCR path) noexcept {
|
||||
OX_REQUIRE_M(filePath, ox::join("/", ox::Array<ox::StringView, 2>{path, f}));
|
||||
OX_REQUIRE(stat, ctx.rom->stat(filePath));
|
||||
if (stat.fileType == ox::FileType::NormalFile) {
|
||||
OX_REQUIRE(data, ctx.rom->read(filePath));
|
||||
auto const [hdr, err] = readAssetHeader(data);
|
||||
ox::Array<char, K1HdrSz> buff;
|
||||
OX_RETURN_ERROR(
|
||||
ctx.rom->read(filePath, 0, buff.size(), buff));
|
||||
auto const [uuid, err] = readUuidHeader(buff);
|
||||
if (!err) {
|
||||
createUuidMapping(ctx, filePath, hdr.uuid);
|
||||
createUuidMapping(ctx, filePath, uuid);
|
||||
}
|
||||
} else if (stat.fileType == ox::FileType::Directory) {
|
||||
if (!beginsWith(f, ".")) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user