Exclude derived scene thumbnails from orphan findings
This commit is contained in:
@@ -211,6 +211,7 @@ function wildcardToRegExp(pattern) {
|
||||
}
|
||||
|
||||
function shouldReportOrphan(file, references) {
|
||||
if (isDerivedSceneThumbnail(file)) return false;
|
||||
if (file.riskClass === "stable-world") {
|
||||
const worldId = file.ownerHint.ownerId;
|
||||
return references.some(reference => reference.sourceScope?.ownerType === "world" && reference.sourceScope.ownerId === worldId);
|
||||
@@ -224,6 +225,11 @@ function shouldReportOrphan(file, references) {
|
||||
return false;
|
||||
}
|
||||
|
||||
function isDerivedSceneThumbnail(file) {
|
||||
const path = String(file.path ?? "");
|
||||
return /^worlds\/[^/]+\/assets\/scenes\/[^/]+-thumb\.(?:png|webp)$/u.test(path);
|
||||
}
|
||||
|
||||
export function createFileRecord(locator, size = null) {
|
||||
return {
|
||||
...locator,
|
||||
|
||||
Reference in New Issue
Block a user