From a16a8a6757980f2115891bbfa871ce401df84f8e Mon Sep 17 00:00:00 2001 From: Alin Date: Mon, 5 Aug 2024 09:44:06 -0600 Subject: [PATCH] v3.8.4 --- Pearcleaner.xcodeproj/project.pbxproj | 8 ++++---- Pearcleaner/Logic/ReversePathsFetch.swift | 17 ++++++++++++++--- Pearcleaner/Settings/Tips.swift | 3 ++- 3 files changed, 20 insertions(+), 8 deletions(-) diff --git a/Pearcleaner.xcodeproj/project.pbxproj b/Pearcleaner.xcodeproj/project.pbxproj index 30a9c49..7df1ef8 100644 --- a/Pearcleaner.xcodeproj/project.pbxproj +++ b/Pearcleaner.xcodeproj/project.pbxproj @@ -561,8 +561,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - APP_BUILD = 57; - APP_VERSION = 3.8.3; + APP_BUILD = 58; + APP_VERSION = 3.8.4; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; @@ -631,8 +631,8 @@ isa = XCBuildConfiguration; buildSettings = { ALWAYS_SEARCH_USER_PATHS = NO; - APP_BUILD = 57; - APP_VERSION = 3.8.3; + APP_BUILD = 58; + APP_VERSION = 3.8.4; ASSETCATALOG_COMPILER_GENERATE_SWIFT_ASSET_SYMBOL_EXTENSIONS = YES; CLANG_ANALYZER_NONNULL = YES; CLANG_ANALYZER_NUMBER_OBJECT_CONVERSION = YES_AGGRESSIVE; diff --git a/Pearcleaner/Logic/ReversePathsFetch.swift b/Pearcleaner/Logic/ReversePathsFetch.swift index e7fe9ea..f3f1d6f 100644 --- a/Pearcleaner/Logic/ReversePathsFetch.swift +++ b/Pearcleaner/Logic/ReversePathsFetch.swift @@ -71,7 +71,7 @@ class ReversePathsSearcher { guard !skipReverse.contains(where: { itemName.pearFormat().contains($0) }), isSupportedFileType(at: itemURL.path), - !isRelatedToInstalledApp(itemPath: itemPath, itemPathOG: itemURL), + !isRelatedToInstalledApp(itemURL: itemURL), !isExcludedByConditions(itemPath: itemPath) else { return @@ -80,11 +80,22 @@ class ReversePathsSearcher { collection.append(itemURL) } - private func isRelatedToInstalledApp(itemPath: String, itemPathOG: URL) -> Bool { + private func isRelatedToInstalledApp(itemURL: URL) -> Bool { + let itemPath = itemURL.path.pearFormat() + for app in sortedApps { - if itemPath.contains(app.bundleIdentifier.pearFormat()) || itemPath.contains(app.appName.pearFormat()) || itemPathOG.containerNameByUUID().pearFormat().contains(app.bundleIdentifier.pearFormat()) { + if itemPath.contains(app.bundleIdentifier.pearFormat()) || + itemPath.contains(app.appName.pearFormat()) { return true } + + // Check if the path contains /Containers or /Group Containers + if itemURL.path.contains("/Containers/") { + let containerName = itemURL.containerNameByUUID().pearFormat() + if containerName.contains(app.bundleIdentifier.pearFormat()) { + return true + } + } } return false } diff --git a/Pearcleaner/Settings/Tips.swift b/Pearcleaner/Settings/Tips.swift index 50c4c3b..1bfc8cb 100644 --- a/Pearcleaner/Settings/Tips.swift +++ b/Pearcleaner/Settings/Tips.swift @@ -26,7 +26,7 @@ struct TipsSettingsTab: View { Text("4. After deletion, you can hit CMD + Z to undo while Pearcleaner or Finder is focused") Text("5. While on the Files view for an app, you can open the Condition Builder with CMD + B or from the Tools menubar item Instructions on using Condition Builder are available on the popup sheet") Text("6. On the Files view again, you can hit CMD + E to export a list of the found files or from the Tools menubar item") - Text("7. CMD + U will launch the updater") + Text("7. CMD + U will check for updates manually") Text("8. CMD + R will refresh the app list. This can also be done from the refresh button in the search bar") Text("9. In the search bar menu button, you will also find Leftover Files which will find files leftover by previously uninstalled applications") Text("10. You can enable a menubar icon from Settings") @@ -35,6 +35,7 @@ struct TipsSettingsTab: View { Text("13. You can enable Homebrew cleanup from Settings") Text("14. You can change the app theme colors from Settings") Text("15. When there's new features available, a new features badge will show at the top of the app list. Same for app updates or missing permissions") + Text("16. You can disable animations in the Settings Interface tab plus a few more other options like confirmation dialog when removing files") } .padding() }