We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents fb225e3 + 6dd616d commit faf03e8Copy full SHA for faf03e8
Sources/MachOKit/Model/DyldCache/DyldSubCacheEntry.swift
@@ -63,6 +63,13 @@ public enum DyldSubCacheEntry: Sendable {
63
// cache
64
extension DyldSubCacheEntry {
65
public func subcache(for cache: DyldCache) throws -> DyldCache? {
66
+ if let _fullCache = cache._fullCache {
67
+ return _fullCache.subCaches.first(
68
+ where: {
69
+ $0.url.lastPathComponent.hasSuffix(fileSuffix)
70
+ }
71
+ )
72
73
let url = URL(fileURLWithPath: cache.url.path + fileSuffix)
74
let subcache = try DyldCache(subcacheUrl: url, mainCache: cache)
75
subcache._fullCache = cache._fullCache
0 commit comments