Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.
Swift cache-cleanercleanerclideveloper-toolsdisk-cleanupdisk-spaceduplicate-finderhomebrewliquid-glassmac-cleanermacosmacos-appmacos-golden-gatemacos-tahoemacos-tweaksswiftswiftuiterminal-themesuninstalluninstaller
Ask to quit only what the person can quit
Țugui Dragoș8f31d0f71fe2
diff --git a/ARCHITECTURE.md b/ARCHITECTURE.mdindex 885f3f01..320685cd 100644--- a/ARCHITECTURE.md+++ b/ARCHITECTURE.md@@ -109,6 +109,9 @@ Take the most common case, uninstalling an app. Every other page follows the samare held back (`leftToItsUninstaller`) rather than moved first.- What Peel itself runs from never moves, nor anything holding it, such as the folder a copy built from sourceruns from: only Remove Peel moves Peel (`TrashFailure.Reason.peelRunsFromIt`).+ - A program another account runs, root's included, can't be quit by the person or by Peel (`kill(2)` answers+ `EPERM`), so it is never in the question to quit apps (`RunningCopies.Process.mayBeQuit`), and what it runs+ from stays with a reason of its own (`heldByAnotherAccount`). `OpenFiles.refusal(of:)` is the one rule.- The app's privacy permissions are reset, when that was chosen, just before the move and only once thechecks the move makes first (the guard, History, and the programs holding it) say it will go(`PrivacyReset`).diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex a973d391..7d5de267 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -59618,6 +59618,112 @@}}},+ "It is in use by %@, which runs as another account or as the system, so neither you nor Peel can quit it. Stop it in Background Items, or with the app’s own uninstaller, then try again." : {+ "localizations" : {+ "cs" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Používá ji %@, který běží pod jiným účtem nebo jako systém, takže ho nemůžete ukončit vy ani Peel. Zastavte ho na stránce Položky na pozadí nebo vlastním odinstalátorem aplikace a zkuste to znovu."+ }+ },+ "de" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Es wird gerade von %@ verwendet, ausgeführt unter einem anderen Benutzeraccount oder vom System, daher lässt es sich weder von dir noch von Peel beenden. Stoppe es auf der Seite „Hintergrundobjekte“ oder mit dem eigenen Deinstallationsprogramm der App und versuche es dann erneut."+ }+ },+ "es" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Está en uso por %@, que se ejecuta con otra cuenta o con la del sistema, así que ni tú ni Peel podéis salir de él. Detenlo en la página Ítems en segundo plano, o con el propio desinstalador de la app, antes de volver a intentarlo."+ }+ },+ "fr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Il est utilisé par %@, qui s’exécute sous un autre compte ou sous celui du système, si bien que ni vous ni Peel ne pouvez le quitter. Arrêtez-le sur la page Éléments en arrière-plan, ou avec le programme de désinstallation propre à l’app, puis réessayez."+ }+ },+ "it" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "È in uso da %@, in esecuzione con un altro account o come sistema, quindi né tu né Peel potete uscirne. Interrompine l’esecuzione in “Elementi in background” o con il programma di disinstallazione dell’app stessa, poi riprova."+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@で使用中です。使用しているプログラムは別のアカウントまたはシステムとして実行されているため、手動でもPeelからも終了できません。“バックグラウンド項目”またはアプリ独自のアンインストーラで停止してから、やり直してください。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@에서 사용 중입니다. 해당 프로그램은 다른 계정이나 시스템으로 실행되므로, 사용자도 Peel도 종료할 수 없습니다. 백그라운드 항목 페이지나 앱 자체의 제거 프로그램을 사용하여 중단한 다음 다시 시도하십시오."+ }+ },+ "nl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Het wordt gebruikt door %@, actief als een andere account of als het systeem, zodat jij en Peel het niet kunnen stoppen. Stop het in 'Achtergrondonderdelen' of met het eigen de-installatieprogramma van de app en probeer het opnieuw."+ }+ },+ "pl" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Jest używane przez: %@. Ten program działa na innym koncie lub jako system, więc ani Ty, ani Peel nie możecie go zakończyć. Zatrzymaj go na stronie Rzeczy działające w tle albo za pomocą własnego dezinstalatora aplikacji, a potem spróbuj ponownie."+ }+ },+ "pt" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Está em uso por %@, que é executado por outra conta ou pelo sistema, então nem você nem o Peel podem encerrá-lo. Interrompa-o na página Itens em Segundo Plano ou com o desinstalador do próprio app e tente novamente."+ }+ },+ "ro" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Este utilizat de %@, care rulează în numele altui cont sau al sistemului, așa că nici dvs., nici Peel nu îl puteți închide. Opriți‑l în pagina Articole de fundal sau cu programul propriu de dezinstalare al aplicației, apoi încercați din nou."+ }+ },+ "ru" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Объект используется: %@. Эта программа выполняется от имени другой учетной записи или системы, поэтому ни Вы, ни Peel не можете ее завершить. Остановите ее в разделе «Фоновые объекты» или с помощью собственной программы удаления приложения, а затем повторите попытку."+ }+ },+ "sv" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Det används av %@, som körs under ett annat konto eller av systemet, så varken du eller Peel kan avsluta det. Stoppa det på sidan Bakgrundsobjekt, eller med appens egen avinstallerare, och försök sedan igen."+ }+ },+ "tr" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "%@ tarafından kullanılıyor. Bu program başka bir hesapla veya sistem olarak çalıştığı için ne siz ne de Peel ondan çıkabilir. Onu Arka Plan Öğeleri’nde veya uygulamanın kendi yükleme kaldırıcısıyla durdurup yeniden deneyin."+ }+ },+ "uk" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Його використовує %@, що працює від імені іншого облікового запису або системи, тож ні ви, ні Peel не можете завершити цей процес. Зупиніть його в розділі «Фонові елементи» або власним деінсталятором програми та спробуйте ще раз."+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "它正在被“%@”使用,后者以另一个账户或系统的身份运行,因此你和Peel都无法退出它。请在“后台项目”中或使用该App自己的卸载器将其停止,然后重试。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "它正由%@使用中,由於其以另一個帳號或系統的身分執行,你和Peel都無法將其結束。請在「背景項目」中停止它,或使用該App自己的解除安裝程式,然後再試一次。"+ }+ }+ }+ },"It is in use by %@. Quit %@, then try again." : {"localizations" : {"cs" : {diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swiftindex a477fac4..a779abe9 100644--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift@@ -410,6 +410,8 @@ extension TrashFailure.Reason {case .heldOpen(let processes):"in use by \(processes.map(Output.plain).joined(separator: ", ")); quit \(processes.count == 1 ? "it" : "them") and try again"case .peelRunsFromIt: "Peel runs from here; only Remove Peel, in the app's Settings > General, removes Peel"+ case .heldByAnotherAccount(let processes):+ "in use by \(processes.map(Output.plain).joined(separator: ", ")), running as another account or as the system, which Peel can't quit; stop it in Background Items or with the app's own uninstaller, then try again"case .failed(let message): Output.plain(message)}}diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/RunningCopies.swift b/Packages/PeelCore/Sources/PeelCore/Apps/RunningCopies.swiftindex b848324f..61dad78e 100644--- a/Packages/PeelCore/Sources/PeelCore/Apps/RunningCopies.swift+++ b/Packages/PeelCore/Sources/PeelCore/Apps/RunningCopies.swift@@ -8,11 +8,15 @@ public enum RunningCopies {public let identifier: pid_tpublic let bundleIdentifier: String?public let bundleURL: URL?+ /// False for a process of another account, root's included, which neither the person nor Peel may signal+ /// (`kill(2)` answers `EPERM`).+ public let mayBeQuit: Bool- public init(identifier: pid_t, bundleIdentifier: String?, bundleURL: URL?) {+ public init(identifier: pid_t, bundleIdentifier: String?, bundleURL: URL?, mayBeQuit: Bool = true) {self.identifier = identifierself.bundleIdentifier = bundleIdentifierself.bundleURL = bundleURL+ self.mayBeQuit = mayBeQuit}}@@ -23,17 +27,19 @@ public enum RunningCopies {return Process(identifier: running.processIdentifier,bundleIdentifier: running.bundleIdentifier,- bundleURL: running.bundleURL+ bundleURL: running.bundleURL,+ mayBeQuit: kill(running.processIdentifier, 0) == 0 || errno != EPERM)}}- /// Returns the processes in `running` that belong to `app`. The app itself is known by where it runs from:- /// a copy elsewhere is another app, and quitting it would close the one in use. The app's helpers run from- /// inside its bundle, or carry an identifier the bundle embeds or one that extends the app's, unless another+ /// Returns the processes in `running` that belong to `app` and may be quit. The app itself is known by where it+ /// runs from: a copy elsewhere is another app, and quitting it would close the one in use. The app's helpers run+ /// from inside its bundle, or carry an identifier the bundle embeds or one that extends the app's, unless another/// installed app owns that identifier (Chrome Canary beside Chrome) or it runs as an app of its own outside a/// Library, as Canary does on another disk. A process whose location is unknown is judged by its identifier.- /// Identifiers are compared without case, as bundle identifiers are.+ /// Identifiers are compared without case, as bundle identifiers are. A process of another account writes none of+ /// the person's files, and while its program runs from inside the app, the move refuses the app.////// `sharingItsSettings` is for a reset: every copy of the app writes the same preference domain, wherever/// it runs from, so all of them count.@@ -53,6 +59,7 @@ public enum RunningCopies {.filter { $0 != identifier }return running.filter { process in+ guard process.mayBeQuit else { return false }let place = process.bundleURL.map(PathPattern.comparablePath)if let place, PathComponents.isPath(place, atOrInside: bundle) { return true }guard let identifier, let name = process.bundleIdentifier?.lowercased() else { return false }diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/OpenFiles.swift b/Packages/PeelCore/Sources/PeelCore/Removal/OpenFiles.swiftindex 574bb927..2da5e1ce 100644--- a/Packages/PeelCore/Sources/PeelCore/Removal/OpenFiles.swift+++ b/Packages/PeelCore/Sources/PeelCore/Removal/OpenFiles.swift@@ -8,7 +8,9 @@ internal import PeelPrivilegedstruct OpenFiles {private enum Hold { case reads, writes, runs }- private let files: [(names: [String], process: String, hold: Hold)]+ private typealias File = (names: [String], process: String, hold: Hold, isAnotherAccounts: Bool)++ private let files: [File]/// The program the excluded process runs. Its open files are no hold, but where it runs from is.private let excludedProgram: [String]?@@ -18,13 +20,14 @@ struct OpenFiles {excludedProgram = excluded.flatMap(RunningProgram.path(of:)).map(PathComponents.of)var pids = [pid_t](repeating: 0, count: 8_192)let count = Int(proc_listallpids(&pids, Int32(pids.count * MemoryLayout<pid_t>.size)))- var files: [(names: [String], process: String, hold: Hold)] = []+ var files: [File] = []for pid in pids.prefix(max(count, 0)) where pid > 0 && pid != excluded && !Self.isACopyOfThisProcess(pid) {let program = Self.program(of: pid).map { [(path: $0, hold: Hold.runs)] } ?? []let paths = Self.paths(openBy: pid) + programguard !paths.isEmpty else { continue }let process = Self.name(of: pid)- files += paths.map { (PathComponents.of($0.path), process, $0.hold) }+ let isAnotherAccounts = kill(pid, 0) != 0 && errno == EPERM+ files += paths.map { (PathComponents.of($0.path), process, $0.hold, isAnotherAccounts) }}self.files = files}@@ -32,9 +35,24 @@ struct OpenFiles {/// The programs that hold `url`. An app is code, which loses nothing when it moves, so a program that only reads/// inside it, as Safari reads an app's Safari extension, holds nothing: what runs from it or writes in it does.func holders(of url: URL, lettingItsProgramsRun: Bool = false) -> [String] {+ Set(holding(url, lettingItsProgramsRun: lettingItsProgramsRun).map(\.process)).sorted()+ }++ /// Why `url` can't move while it is held, or nil when nothing holds it.+ func refusal(of url: URL, lettingItsProgramsRun: Bool) -> TrashFailure.Reason? {+ let names = PathComponents.of(PathPattern.canonical(url).path(percentEncoded: false))+ if !lettingItsProgramsRun, let excludedProgram, excludedProgram.starts(with: names) { return .peelRunsFromIt }+ let holding = holding(url, lettingItsProgramsRun: lettingItsProgramsRun)+ let others = Set(holding.filter(\.isAnotherAccounts).map(\.process)).sorted()+ if !others.isEmpty { return .heldByAnotherAccount(by: others) }+ let holders = Set(holding.map(\.process)).sorted()+ return holders.isEmpty ? nil : .heldOpen(by: holders)+ }++ private func holding(_ url: URL, lettingItsProgramsRun: Bool) -> [File] {let names = PathComponents.of(PathPattern.canonical(url).path(percentEncoded: false))let isAnApp = url.pathExtension.caseInsensitiveCompare("app") == .orderedSame- let holding = files.filter { file in+ return files.filter { file inguard file.names.starts(with: names) else { return false }switch file.hold {case .reads: return !isAnApp@@ -42,12 +60,6 @@ struct OpenFiles {case .runs: return !lettingItsProgramsRun}}- return Set(holding.map(\.process)).sorted()- }-- func runsTheExcludedProcess(from url: URL, lettingItsProgramsRun: Bool = false) -> Bool {- guard !lettingItsProgramsRun, let excludedProgram else { return false }- return excludedProgram.starts(with: PathComponents.of(PathPattern.canonical(url).path(percentEncoded: false)))}private static func paths(openBy pid: pid_t) -> [(path: String, hold: Hold)] {diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/TrashService.swift b/Packages/PeelCore/Sources/PeelCore/Removal/TrashService.swiftindex 3ccd5033..79b19078 100644--- a/Packages/PeelCore/Sources/PeelCore/Removal/TrashService.swift+++ b/Packages/PeelCore/Sources/PeelCore/Removal/TrashService.swift@@ -85,6 +85,8 @@ public struct TrashFailure: Sendable, Hashable {case heldOpen(by: [String])/// Peel itself runs from it or from inside it, and only Remove Peel moves Peel.case peelRunsFromIt+ /// Processes of another account, root's included, run from it, and neither the person nor Peel may quit them.+ case heldByAnotherAccount(by: [String])case failed(String)}@@ -104,7 +106,7 @@ extension TrashFailure.Reason {switch self {case .historyUnreadable, .needsHelper: falsecase .guarded, .changedSinceScan, .claimedSinceScan, .lastCopy, .notPermitted, .locked, .movedWithoutATrace,- .somethingElseMoved, .heldOpen, .peelRunsFromIt, .failed: true+ .somethingElseMoved, .heldOpen, .peelRunsFromIt, .heldByAnotherAccount, .failed: true}}@@ -124,6 +126,7 @@ extension TrashFailure.Reason {case .historyUnreadable: "history-unreadable"case .heldOpen: "held-open"case .peelRunsFromIt: "peel-runs-from-it"+ case .heldByAnotherAccount: "held-by-another-account"case .failed: "failed"}}@@ -132,7 +135,7 @@ extension TrashFailure.Reason {switch self {case .failed(let message): messagecase .somethingElseMoved(let name): name- case .heldOpen(let processes): processes.joined(separator: "\n")+ case .heldOpen(let processes), .heldByAnotherAccount(let processes): processes.joined(separator: "\n")default: nil}}@@ -156,6 +159,8 @@ extension TrashFailure.Reason {case "history-unreadable": self = .historyUnreadablecase "held-open": self = .heldOpen(by: (detail ?? "").split(separator: "\n").map(String.init))case "peel-runs-from-it": self = .peelRunsFromIt+ case "held-by-another-account":+ self = .heldByAnotherAccount(by: (detail ?? "").split(separator: "\n").map(String.init))case "failed": self = .failed(detail ?? "")default: return nil}@@ -297,11 +302,8 @@ public struct TrashService: Sendable {for url in urls {if let refusal = refusal(of: url) {refusals[url] = refusal- } else if openFiles.runsTheExcludedProcess(from: url, lettingItsProgramsRun: apps.contains(url)) {- refusals[url] = .peelRunsFromIt- } else if case let holders = openFiles.holders(of: url, lettingItsProgramsRun: apps.contains(url)),- !holders.isEmpty {- refusals[url] = .heldOpen(by: holders)+ } else if let held = openFiles.refusal(of: url, lettingItsProgramsRun: apps.contains(url)) {+ refusals[url] = held}}return refusals@@ -362,13 +364,8 @@ public struct TrashService: Sendable {// An item inside a folder that just moved went with it: it is neither moved again nor a failure.let path = PathPattern.comparablePath(of: url)guard !moved.hold(path) else { continue }- guard !openFiles.runsTheExcludedProcess(from: url, lettingItsProgramsRun: apps.contains(url)) else {- result.failures.append(TrashFailure(url: url, reason: .peelRunsFromIt))- continue- }- let holders = openFiles.holders(of: url, lettingItsProgramsRun: apps.contains(url))- guard holders.isEmpty else {- result.failures.append(TrashFailure(url: url, reason: .heldOpen(by: holders)))+ if let held = openFiles.refusal(of: url, lettingItsProgramsRun: apps.contains(url)) {+ result.failures.append(TrashFailure(url: url, reason: held))continue}do {@@ -466,13 +463,8 @@ public struct TrashService: Sendable {var allowed: [URL] = []for url in permitted {guard !paths.hold(PathPattern.comparablePath(of: url)) else { continue }- guard !openFiles.runsTheExcludedProcess(from: url, lettingItsProgramsRun: apps.contains(url)) else {- result.failures.append(TrashFailure(url: url, reason: .peelRunsFromIt))- continue- }- let holders = openFiles.holders(of: url, lettingItsProgramsRun: apps.contains(url))- guard holders.isEmpty else {- result.failures.append(TrashFailure(url: url, reason: .heldOpen(by: holders)))+ if let held = openFiles.refusal(of: url, lettingItsProgramsRun: apps.contains(url)) {+ result.failures.append(TrashFailure(url: url, reason: held))continue}allowed.append(url)diff --git a/Packages/PeelCore/Tests/PeelCoreTests/RefusalLogTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/RefusalLogTests.swiftindex 94039f88..b055fd8e 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/RefusalLogTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/RefusalLogTests.swift@@ -215,7 +215,7 @@ struct RefusalLogTests {private static let everyReason: [TrashFailure.Reason] = [.guarded(nil), .changedSinceScan, .claimedSinceScan, .lastCopy, .notPermitted, .needsHelper,.movedWithoutATrace, .somethingElseMoved(named: "x 2"), .historyUnreadable,- .heldOpen(by: ["Figma Agent", "java"]), .peelRunsFromIt, .failed("x"),+ .heldOpen(by: ["Figma Agent", "java"]), .peelRunsFromIt, .heldByAnotherAccount(by: ["CtxHelper"]), .failed("x"),] + GuardRefusal.allCases.map { .guarded($0) }/// A record stores its reason as a word, not a sentence, so a later version of Peel can still read it.@@ -224,7 +224,7 @@ struct RefusalLogTests {#expect(Set(reasons.map(\.name)).count == reasons.count)#expect(reasons.allSatisfy { !$0.name.contains(" ") })- #expect(reasons.filter { $0.detail != nil }.count == 3)+ #expect(reasons.filter { $0.detail != nil }.count == 4)}/// History words a refusal from the reason it stored, so every word leads back to its reason, and a word adiff --git a/Packages/PeelCore/Tests/PeelCoreTests/RunningCopiesTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/RunningCopiesTests.swiftindex 91829cc6..8a31e5fd 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/RunningCopiesTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/RunningCopiesTests.swift@@ -42,6 +42,18 @@ struct RunningCopiesTests {]) == ["com.google.Chrome", "com.google.Chrome.helper", "com.google.Keystone.Agent", "com.google.Chrome.framework.AlertNotificationService"])}+ @MainActor @Test func leavesOutWhatThisAccountCannotQuit() {+ let running = RunningCopies.current+ let unquittable = running.filter { kill($0.identifier, 0) != 0 && errno == EPERM }+ for case let (process, bundle?) in unquittable.map({ ($0, $0.bundleURL) }) {+ let app = InstalledApp(url: bundle, bundleIdentifier: process.bundleIdentifier, name: "")++ let toQuit = RunningCopies.belonging(to: app, among: running, installedApps: [app])++ #expect(!toQuit.contains { $0.identifier == process.identifier })+ }+ }+@Test func anAppWithNoIdentifierIsKnownByWhereItRuns() {let editor = InstalledApp(url: URL(filePath: "/Applications/Plain Editor.app"), bundleIdentifier: nil, name: "Plain Editor")let running = [diff --git a/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swiftindex 135fda3e..cb405301 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/TrashServiceTests.swift@@ -800,6 +800,19 @@ struct TrashServiceTests {#expect(service.refusalsNow(of: [folder], lettingTheirProgramsRun: []) == [folder: .peelRunsFromIt])}+ @MainActor @Test func leavesWhatAnotherAccountRunsFromWithAReasonOfItsOwn() {+ let openFiles = OpenFiles()+ let unquittable = RunningCopies.current.filter { kill($0.identifier, 0) != 0 && errno == EPERM }+ for case let (process, bundle?) in unquittable.map({ ($0, $0.bundleURL) }) {+ guard case .heldByAnotherAccount(let names) = openFiles.refusal(of: bundle, lettingItsProgramsRun: false)+ else {+ Issue.record("\(bundle.path(percentEncoded: false)) was refused for no reason of its own")+ continue+ }+ #expect(names.contains(OpenFiles.name(of: process.identifier)))+ }+ }+@Test func leavesAFolderAnotherProcessHoldsAFileOpenIn() async throws {let directory = try TemporaryDirectory()let service = try service(in: directory)diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swiftindex e41e3479..2b5e5215 100644--- a/Peel/Views/Presentation.swift+++ b/Peel/Views/Presentation.swift@@ -155,6 +155,8 @@ extension TrashFailure.Reason {case .heldOpen(let processes):String(localized: "It is in use by \(processes.formatted(.list(type: .and))). Quit \(processes.formatted(.list(type: .and))), then try again.")case .peelRunsFromIt: String(localized: "Peel itself runs from here, and only Remove Peel, in Settings > General, removes Peel.")+ case .heldByAnotherAccount(let processes):+ String(localized: "It is in use by \(processes.formatted(.list(type: .and))), which runs as another account or as the system, so neither you nor Peel can quit it. Stop it in Background Items, or with the app’s own uninstaller, then try again.")case .failed(let message): FixedSentence.translated(message)}}diff --git a/SAFETY.md b/SAFETY.mdindex ef9d4427..32ea01ca 100644--- a/SAFETY.md+++ b/SAFETY.md@@ -148,7 +148,9 @@ once it is moved, as Mullvad VPN does: the program running from it is the one thtoo: whatever Peel runs from, and any folder holding it, stays, since only Remove Peel moves Peel. Of programs thatrun as another account or as root, macOS's own among them, only the program can be seen, never the files it holdsopen, which is why Space also leaves macOS's own caches unselected, and in the Library at the top of the disk, where-those programs keep theirs, does not list them at all.+those programs keep theirs, does not list them at all. Neither you nor Peel can quit such a program, so Peel never+asks you to: what it runs from stays, and says so, until it is stopped in Background Items or by the app's own+uninstaller.A move to the Trash, or back from it, never replaces what is already at the new name. Most disks refuse that bythemselves; on one that cannot, such as exFAT, Peel first takes the name with an empty placeholder, which only a