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
Duplicates names the folders it did not look in, even with results
Țugui Dragoș703e8d127a0e
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstringsindex 0810f8d8..3abdbb0b 100644--- a/Localization/Peel/Localizable.xcstrings+++ b/Localization/Peel/Localizable.xcstrings@@ -84652,6 +84652,686 @@}}},+ "Peel couldn’t look in ^[%lld folder](inflect: true)" : {+ "localizations" : {+ "cs" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složek"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složky"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složky"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složek"+ }+ }+ }+ }+ },+ "de" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel konnte in %lld Ordner nicht hineinsehen"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel konnte in %lld Ordner nicht hineinsehen"+ }+ }+ }+ }+ },+ "es" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en %lld de carpetas"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en una carpeta"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en %lld carpetas"+ }+ }+ }+ }+ },+ "fr" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld de dossiers"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld dossier"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld dossiers"+ }+ }+ }+ }+ },+ "it" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare %lld di cartelle"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare una cartella"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare %lld cartelle"+ }+ }+ }+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peelが調べられなかったフォルダが%lld個あります"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel이 폴더 %lld개를 살펴볼 수 없음"+ }+ },+ "nl" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kon niet in één map kijken"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kon niet in %lld mappen kijken"+ }+ }+ }+ }+ },+ "pl" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderów"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderów"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderu"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderu"+ }+ }+ }+ }+ },+ "pt" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld de pastas"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld pasta"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld pastas"+ }+ }+ }+ }+ },+ "ro" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld dosare"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld dosar"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld de dosare"+ }+ }+ }+ }+ },+ "ru" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папки"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папок"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папку"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папки"+ }+ }+ }+ }+ },+ "sv" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kunde inte titta i en mapp"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kunde inte titta i %lld mappar"+ }+ }+ }+ }+ },+ "tr" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel %lld klasörün içine bakamadı"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel %lld klasörün içine bakamadı"+ }+ }+ }+ }+ },+ "uk" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папки"+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папок"+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папку"+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папки"+ }+ }+ }+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "有%lld个文件夹Peel无法查看"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel無法查看%lld個檔案夾"+ }+ }+ }+ },+ "Peel couldn’t look in ^[%lld folder](inflect: true)." : {+ "localizations" : {+ "cs" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složek."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složky."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složky."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nemohl nahlédnout do %lld složek."+ }+ }+ }+ }+ },+ "de" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel konnte in %lld Ordner nicht hineinsehen."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel konnte in %lld Ordner nicht hineinsehen."+ }+ }+ }+ }+ },+ "es" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en %lld de carpetas."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en una carpeta."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel no ha podido mirar en %lld carpetas."+ }+ }+ }+ }+ },+ "fr" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld de dossiers."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld dossier."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel n’a pas pu regarder dans %lld dossiers."+ }+ }+ }+ }+ },+ "it" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare %lld di cartelle."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare una cartella."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel non è riuscito a esaminare %lld cartelle."+ }+ }+ }+ }+ },+ "ja" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peelが調べられなかったフォルダが%lld個あります。"+ }+ },+ "ko" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel이 폴더 %lld개를 살펴볼 수 없었습니다."+ }+ },+ "nl" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kon niet in één map kijken."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kon niet in %lld mappen kijken."+ }+ }+ }+ }+ },+ "pl" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderów."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderów."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderu."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nie mógł zajrzeć do %lld folderu."+ }+ }+ }+ }+ },+ "pt" : {+ "variations" : {+ "plural" : {+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld de pastas."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld pasta."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "O Peel não conseguiu examinar %lld pastas."+ }+ }+ }+ }+ },+ "ro" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld dosare."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld dosar."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel nu a putut căuta în %lld de dosare."+ }+ }+ }+ }+ },+ "ru" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папки."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папок."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папку."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не смог заглянуть в %lld папки."+ }+ }+ }+ }+ },+ "sv" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kunde inte titta i en mapp."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel kunde inte titta i %lld mappar."+ }+ }+ }+ }+ },+ "tr" : {+ "variations" : {+ "plural" : {+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel %lld klasörün içine bakamadı."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel %lld klasörün içine bakamadı."+ }+ }+ }+ }+ },+ "uk" : {+ "variations" : {+ "plural" : {+ "few" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папки."+ }+ },+ "many" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папок."+ }+ },+ "one" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папку."+ }+ },+ "other" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel не вдалося зазирнути в %lld папки."+ }+ }+ }+ }+ },+ "zh-Hans" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "有%lld个文件夹Peel无法查看。"+ }+ },+ "zh-Hant" : {+ "stringUnit" : {+ "state" : "translated",+ "value" : "Peel無法查看%lld個檔案夾。"+ }+ }+ }+ },"Peel couldn’t make sure Homebrew keeps the formulae your exclusions cover, so it ran nothing. A brew.env file that sets HOMEBREW_NO_CLEANUP_FORMULAE replaces the list Peel gives it." : {"localizations" : {"cs" : {diff --git a/Packages/PeelCore/Sources/PeelCore/Duplicates/Duplicates.swift b/Packages/PeelCore/Sources/PeelCore/Duplicates/Duplicates.swiftindex f11ae3f0..91587295 100644--- a/Packages/PeelCore/Sources/PeelCore/Duplicates/Duplicates.swift+++ b/Packages/PeelCore/Sources/PeelCore/Duplicates/Duplicates.swift@@ -106,10 +106,15 @@ public struct DuplicateScan: Sendable {/// allow. It stays false for a folder locked by ordinary permissions, or one that is missing.public var needsFullDiskAccess = false+ /// The folders Peel could not read or skipped, where duplicates may still be, whatever else it found.+ public var notLookedIn: [URL] {+ unreadableLocations + skippedLocations+ }+/// True when no duplicates were found but some of what was asked for could not be read or was skipped, even/// one locked folder at any depth. Duplicates may then exist where Peel could not look.public var readNothing: Bool {- groups.isEmpty && folderGroups.isEmpty && !(unreadableLocations.isEmpty && skippedLocations.isEmpty)+ groups.isEmpty && folderGroups.isEmpty && !notLookedIn.isEmpty}/// Every file except the suggested one to keep in each group.diff --git a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swiftindex 9a11670d..37a729c4 100644--- a/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift+++ b/Packages/PeelCore/Tests/PeelCoreTests/DuplicateFinderTests.swift@@ -174,6 +174,21 @@ struct DuplicateFinderTests {#expect(inside.groups.isEmpty, "a folder inside a repository was scanned")}+ /// Copies found elsewhere do not hide a chosen folder Peel did not look in: the page still names it.+ @Test func namesTheFoldersItDidNotLookInBesideWhatItFound() async throws {+ let directory = try TemporaryDirectory()+ let contents = randomData(count: 3_000)+ try directory.file("home/Developer/Thing/.git/HEAD")+ try directory.file("home/Documents/a.bin", contents: contents)+ try directory.file("home/Documents/b.bin", contents: contents)++ let found = try await scan(directory, folders: ["home/Developer/Thing", "home/Documents"])++ #expect(!found.groups.isEmpty)+ #expect(!found.readNothing)+ #expect(found.notLookedIn.map(\.lastPathComponent) == ["Thing"])+ }+/// A project is left alone like a repository, even without one: it is known by its build file.@Test func leavesAloneAProjectKnownByItsBuildFile() async throws {let directory = try TemporaryDirectory()diff --git a/Peel/Views/Duplicates/DuplicateList.swift b/Peel/Views/Duplicates/DuplicateList.swiftindex fc29dd2c..e08387d0 100644--- a/Peel/Views/Duplicates/DuplicateList.swift+++ b/Peel/Views/Duplicates/DuplicateList.swift@@ -45,7 +45,7 @@ struct DuplicateList: View {ContentUnavailableView {Label("Not Everything Could Be Read", systemImage: "exclamationmark.triangle")} description: {- Text("No duplicates were found, but Peel couldn’t look in ^[\(scan.unreadableLocations.count + scan.skippedLocations.count) folder](inflect: true), so there may be some there. Give Peel Full Disk Access, or choose folders it can read.")+ Text("No duplicates were found, but Peel couldn’t look in ^[\(scan.notLookedIn.count) folder](inflect: true), so there may be some there. Give Peel Full Disk Access, or choose folders it can read.")} actions: {if scan.needsFullDiskAccess {Button("Open System Settings") { home.openFullDiskAccessSettings() }@@ -111,13 +111,21 @@ struct DuplicateList: View {// A scan ends without a result only when it was stopped..announcesScan(duplicates.isScanning,- found: duplicates.summary,+ found: summary,couldNotLook: duplicates.scan?.readNothing == true ? "Not Everything Could Be Read" : nil,wasStopped: duplicates.scan == nil).navigationTitle(Text(Tool.duplicates.title))}+ /// What VoiceOver hears when a scan ends: what it found, and the folders it could not look in.+ private var summary: AttributedString? {+ guard let found = duplicates.summary, let count = duplicates.scan?.notLookedIn.count, count > 0 else {+ return duplicates.summary+ }+ return found + " " + AttributedString(localized: "Peel couldn’t look in ^[\(count) folder](inflect: true).")+ }+/// A new scan clears what the last one found, so it asks first when there is something to lose.private func requestScan() {if let scan = duplicates.scan, !scan.groups.isEmpty || !scan.folderGroups.isEmpty {diff --git a/Peel/Views/Duplicates/DuplicateStatusViews.swift b/Peel/Views/Duplicates/DuplicateStatusViews.swiftindex a5f87e29..8d62c444 100644--- a/Peel/Views/Duplicates/DuplicateStatusViews.swift+++ b/Peel/Views/Duplicates/DuplicateStatusViews.swift@@ -76,6 +76,15 @@ struct DuplicateSummaryView: View {.padding(.horizontal, 20).padding(.top, 12)}+ if !scan.notLookedIn.isEmpty {+ Notice(+ title: Text("Peel couldn’t look in ^[\(scan.notLookedIn.count) folder](inflect: true)"),+ detail: Text(verbatim: scan.notLookedIn.map(\.abbreviatedPath).formatted(.list(type: .and))),+ kind: .note+ ) {}+ .padding(.horizontal, 20)+ .padding(.top, 12)+ }ContentUnavailableView {Label("Duplicates Found", systemImage: "doc.on.doc")} description: {