Skip to content

Free, open-source macOS cleaner. CleanMyMac alternative with zero telemetry. Native SwiftUI, scheduled auto-cleaning, Xcode/Homebrew/system cache cleanup. MIT licensed.

chore(xcode): drop dead managed-path checks and an unused alias

momenbaseladf543b070a2
diff --git a/PureMac/Logic/Utilities/XcodeBuildMCPDerivedDataSupport.swift b/PureMac/Logic/Utilities/XcodeBuildMCPDerivedDataSupport.swift
index 22be597..47712ae 100644
--- a/PureMac/Logic/Utilities/XcodeBuildMCPDerivedDataSupport.swift
+++ b/PureMac/Logic/Utilities/XcodeBuildMCPDerivedDataSupport.swift
@@ -316,5 +316,3 @@ enum XcodeBuildMCPDerivedDataSupport {
)
}
}
-
-typealias XcodeBuildMCPStorage = XcodeBuildMCPDerivedDataSupport
diff --git a/PureMac/Services/CleaningEngine.swift b/PureMac/Services/CleaningEngine.swift
index 5a4dbe1..5e338b3 100644
--- a/PureMac/Services/CleaningEngine.swift
+++ b/PureMac/Services/CleaningEngine.swift
@@ -202,8 +202,8 @@ actor CleaningEngine {
// cleanup. XcodeBuildMCP DerivedData must not be unlinked.
var resulting: NSURL?
try fileManager.trashItem(at: resolvedURL, resultingItemURL: &resulting)
- if let resulting {
- result.trashedPaths.insert(resulting.path ?? "")
+ if let trashedPath = resulting?.path {
+ result.trashedPaths.insert(trashedPath)
}
} else {
try fileManager.removeItem(at: itemURL)
@@ -593,13 +593,6 @@ actor CleaningEngine {
/// deletions can still happen through the explicit per-item flow.
private func isSafeToDelete(resolvedPath: String) -> Bool {
let home = homeDirectory.path
- if XcodeBuildMCPDerivedDataSupport.isManagedDerivedDataPath(
- resolvedPath,
- homeDirectory: homeDirectory
- ) {
- return true
- }
-
// Cloud File Provider state is never deletable, whatever category asked
// and whichever allowed root it happens to sit under (issue #142).
// Checked before the allowlist because several provider directories live