Skip to content

Commit

Permalink
CorpseFinder: Fix detection of nested corpses on public storage
Browse files Browse the repository at this point in the history
The marker segments are prefix-free, so we also need to compare it with the prefix-free area information, otherwise we get no match.
e.g.
Before: `{/storage/emulated/0/Android}.isAncestorOf(Android/cache)`
Now:  `{Android}.isAncestorOf(Android/cache)`
  • Loading branch information
d4rken committed Nov 6, 2024
1 parent 06d3870 commit c270273
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ class SdcardCorpseFilter @Inject constructor(
.filter { area ->
// Only makes sense to process this nested marker if the parent actually exists
val areaContent = topLevelContent[area]!!
areaContent.any { it.item.segments.isAncestorOf(marker.segments) }
areaContent.any { it.areaInfo.prefixFreeSegments.isAncestorOf(marker.segments) }
}
.map { determineNestedCandidates(it, marker) }
.flatten()
Expand Down

0 comments on commit c270273

Please sign in to comment.