From 7a8cecb6cf650ed9bffbddcf0dcaa68d0a6c979c Mon Sep 17 00:00:00 2001 From: Lessica <82flex@gmail.com> Date: Fri, 10 Jan 2025 23:39:53 +0800 Subject: [PATCH] bugfix: zipped bundle not marked Signed-off-by: Lessica <82flex@gmail.com> --- CHANGELOG.md | 5 ++++- TrollFools/InjectorV3+Preprocess.swift | 10 ++++++++-- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index c1593a1..f8a0962 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,2 +1,5 @@ - Re-write the injector entirely to be more modular and easier to maintain. -- Speed up the injector by choosing a smaller framework to inject into. +- Speed up the injector by: + - Choose a smaller framework to inject into. + - Skip Mach-Os with **cryptid > 0** +- Update [ChOma](https://github.com/opa334/ChOma/tree/61acfba55695c8f3c6607dd0be933aa104eb9531) to its latest commit. diff --git a/TrollFools/InjectorV3+Preprocess.swift b/TrollFools/InjectorV3+Preprocess.swift index e523744..3b5366a 100644 --- a/TrollFools/InjectorV3+Preprocess.swift +++ b/TrollFools/InjectorV3+Preprocess.swift @@ -35,11 +35,17 @@ extension InjectorV3 { try FileManager.default.createDirectory(at: extractedURL, withIntermediateDirectories: true) try FileManager.default.unzipItem(at: assetURL, to: extractedURL) - let extractedContents = try FileManager.default + let extractedItems = try FileManager.default .contentsOfDirectory(at: extractedURL, includingPropertiesForKeys: nil) .filter { Self.allowedPathExtensions.contains($0.pathExtension.lowercased()) } - preparedAssetURLs.append(contentsOf: extractedContents) + for extractedItem in extractedItems { + if checkIsBundle(extractedItem) { + urlsToMarkAsInjected.append(extractedItem) + } + } + + preparedAssetURLs.append(contentsOf: extractedItems) continue }