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
Say why Remove Peel couldn't read Peel itself
Țugui Dragoș50ab8173be6d
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex b0867e87..17ff3147 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -141226,112 +141226,6 @@}}},- "Peel couldn’t read its own files." : {- "localizations" : {- "cs" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel nemohl přečíst vlastní soubory."- }- },- "de" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel konnte die eigenen Dateien nicht lesen."- }- },- "es" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel no ha podido leer sus propios archivos."- }- },- "fr" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel n’a pas pu lire ses propres fichiers."- }- },- "it" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel non è riuscito a leggere i propri file."- }- },- "ja" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peelは自身のファイルを読み取れませんでした。"- }- },- "ko" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel이 자신의 파일을 읽을 수 없습니다."- }- },- "nl" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel kon zijn eigen bestanden niet lezen."- }- },- "pl" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel nie mógł odczytać własnych plików."- }- },- "pt" : {- "stringUnit" : {- "state" : "translated",- "value" : "O Peel não conseguiu ler os próprios arquivos."- }- },- "ro" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel nu și‑a putut citi propriile fișiere."- }- },- "ru" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel не удалось прочитать собственные файлы."- }- },- "sv" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel kunde inte läsa sina egna filer."- }- },- "tr" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel kendi dosyalarını okuyamadı."- }- },- "uk" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel не вдалося прочитати власні файли."- }- },- "zh-Hans" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel未能读取自己的文件。"- }- },- "zh-Hant" : {- "stringUnit" : {- "state" : "translated",- "value" : "Peel無法讀取自己的檔案。"- }- }- }- },"Peel couldn’t read launchctl’s list of the jobs turned off, so it doesn’t start, stop, enable, or disable this one here." : {"localizations" : {"cs" : {diff --git a/Peel/Model/SelfUninstall.swift b/Peel/Model/SelfUninstall.swiftindex 8f1225c9..5156d2f7 100644--- a/Peel/Model/SelfUninstall.swift+++ b/Peel/Model/SelfUninstall.swift@@ -126,7 +126,7 @@ final class SelfUninstall {) async {let bundleURL = Bundle.main.bundleURLguard let app = await AppLibrary.inspect(bundleURL) else {- tell(.stayed(String(localized: "Peel couldn’t read its own files.")), words)+ tell(.stayed(AppInspector.whyUnreadable(bundleURL).explanation(at: bundleURL)), words)return}let exclusions = ExclusionsStore.shared.exclusionsdiff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swiftindex 35b9e91d..f6575f79 100644--- a/Peel/Views/Presentation.swift+++ b/Peel/Views/Presentation.swift@@ -240,8 +240,15 @@ extension TrashFailure.Reason {extension CouldNotShow {/// Why the window couldn't show this app, with its path.var explanation: String {+ reason.explanation(at: url)+ }+}++extension AppInspector.Unreadable {+ /// Why the bundle at `url` couldn't be read as an app, with its path.+ func explanation(at url: URL) -> String {let path = url.abbreviatedPath- return switch reason {+ return switch self {case .gone: String(localized: "\(path) isn’t there anymore.")case .notAnApp: String(localized: "\(path) isn’t an app.")case .noInfo: String(localized: "\(path) has no Info.plist, the file that says what an app is, so Peel can’t read it as one.")