Skip to content

armgit / peel

Public Imported from GitHub
0

Uninstall Mac apps with every file they leave behind, and see why each belongs. Free up space, fine-tune macOS, and set up Terminal.

Space lists the copies Mail keeps of the attachments you open

Țugui Dragoș929600dcca15
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 633d6856..cc29875e 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -22818,6 +22818,112 @@
}
}
},
+ "Copies of the attachments you opened in Mail. Mail deletes each with its message unless you edited it, so they are listed and never selected." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kopie příloh, které jste otevřeli v aplikaci Mail. Aplikace Mail každou z nich smaže spolu s její zprávou, pokud jste ji neupravili, proto se zobrazují, ale nikdy se nevybírají."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kopien der Anhänge, die du in Mail geöffnet hast. Mail löscht jede Kopie zusammen mit ihrer E-Mail, sofern du sie nicht bearbeitet hast, daher werden sie angezeigt, aber nie ausgewählt."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Copias de los archivos adjuntos que has abierto en Mail. Mail borra cada una con su mensaje salvo que la hayas editado, por eso se muestran pero nunca se seleccionan."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Copies des pièces jointes que vous avez ouvertes dans Mail. Mail supprime chacune avec son message, sauf si vous l’avez modifiée. C’est pourquoi elles sont listées mais jamais sélectionnées."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Copie degli allegati che hai aperto in Mail. Mail elimina ognuna insieme al suo messaggio, a meno che tu non l’abbia modificata, quindi sono elencate ma mai selezionate."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "メールで開いた添付ファイルのコピーです。編集していないものはメッセージの削除時にメールが一緒に削除するため、一覧には表示されますが、自動で選択されることはありません。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mail에서 연 첨부 파일의 복사본입니다. Mail은 편집하지 않은 한 각 복사본을 해당 메시지와 함께 삭제하므로, 목록에 표시되지만 절대 미리 선택되지 않습니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kopieën van de bijlagen die je in Mail hebt geopend. Mail verwijdert elke kopie samen met het bijbehorende bericht, tenzij je deze hebt bewerkt, dus ze worden getoond maar nooit geselecteerd."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kopie załączników otwartych przez Ciebie w Poczcie. Poczta usuwa każdą z nich razem z jej wiadomością, jeśli jej nie edytowano, dlatego są na liście, ale nigdy nie są zaznaczane."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Cópias dos anexos que você abriu no Mail. O Mail apaga cada uma com a respectiva mensagem, a menos que você a tenha editado, por isso elas são listadas, mas nunca selecionadas."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Copii ale fișierelor atașate pe care le‑ați deschis în Mail. Mail șterge fiecare copie odată cu mesajul său, dacă nu ați editat‑o, așa că sunt listate, dar nu sunt niciodată selectate."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Копии вложений, которые Вы открывали в Почте. Почта удаляет каждую из них вместе с ее письмом, если Вы ее не редактировали, поэтому они показываются в списке, но никогда не выбираются."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Kopior av bilagor som du har öppnat i Mail. Mail raderar varje bilaga tillsammans med mejlet den hör till om du inte har redigerat den, så de visas i listan men markeras aldrig."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mail’de açtığınız ilişiklerin kopyaları. Mail, düzenlemediğiniz her birini iletisiyle birlikte siler; bu yüzden listelenir ama hiçbir zaman seçilmez."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Копії вкладень, які ви відкривали в Пошті. Пошта видаляє кожну разом із її листом, якщо ви її не редагували, тому вони показуються, але ніколи не вибираються."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "你在“邮件”中打开的附件的副本。除非你编辑过,否则“邮件”会在删除邮件时一并删除每个副本,因此它们会列出,但绝不会被选择。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "你在「郵件」中打開的附件副本。「郵件」會隨郵件一併刪除每個副本,除非你編輯過它,因此這些副本會列出,但絕不會選取。"
+ }
+ }
+ }
+ },
"Copy" : {
"localizations" : {
"cs" : {
@@ -54364,6 +54470,112 @@
}
}
},
+ "Mail Downloads" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Přílohy pošty"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mail-Downloads"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Descargas de Mail"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Téléchargements Mail"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Download di Mail"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "メールダウンロード"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "메일 다운로드"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Downloads in Mail"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Pobrane rzeczy Poczty"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Downloads do Mail"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Descărcări Mail"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Загрузки Почты"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Hämtningsmappen för Mail"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mail İndirilenleri"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Поштові викачування"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Mail Downloads"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "郵件下載項目"
+ }
+ }
+ }
+ },
"Mail Plug-ins" : {
"localizations" : {
"cs" : {
@@ -67793,6 +68005,112 @@
}
}
},
+ "Not selected: Mail keeps a copy here of each attachment you open, and one you edited may exist nowhere else." : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nevybráno: aplikace Mail zde uchovává kopii každé přílohy, kterou otevřete, a kopie, kterou jste upravili, nemusí existovat nikde jinde."
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nicht ausgewählt: Mail bewahrt hier eine Kopie jedes Anhangs auf, den du öffnest, und eine bearbeitete Kopie gibt es möglicherweise nirgendwo sonst."
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Sin seleccionar: Mail guarda aquí una copia de cada archivo adjunto que abres, y una que hayas editado puede no existir en ningún otro sitio."
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Non sélectionné : Mail conserve ici une copie de chaque pièce jointe que vous ouvrez, et une copie que vous avez modifiée n’existe peut-être nulle part ailleurs."
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Non selezionato: Mail conserva qui una copia di ogni allegato che apri, e una copia che hai modificato potrebbe non esistere altrove."
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未選択: メールは開いた添付ファイルのコピーをここに保存しており、編集したコピーはほかのどこにも存在しない可能性があります。"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "선택되지 않음: Mail은 사용자가 여는 각 첨부 파일의 복사본을 여기에 보관하며, 편집한 복사본은 다른 곳에 없을 수 있습니다."
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Niet geselecteerd: Mail bewaart hier een kopie van elke bijlage die je opent, en een kopie die je hebt bewerkt, bestaat misschien nergens anders."
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nie zaznaczono: Poczta przechowuje tu kopię każdego otwieranego przez Ciebie załącznika, a edytowana przez Ciebie kopia może nie istnieć nigdzie indziej."
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Não selecionado: o Mail mantém aqui uma cópia de cada anexo que você abre, e uma cópia que você editou pode não existir em nenhum outro lugar."
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Neselectat: Mail păstrează aici o copie a fiecărui fișier atașat pe care îl deschideți, iar o copie pe care ați editat‑o poate să nu existe în altă parte."
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Не выбрано: Почта хранит здесь копию каждого вложения, которое Вы открываете, а отредактированная Вами копия, возможно, есть только здесь."
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Inte markerad: Mail sparar här en kopia av varje bilaga du öppnar, och en bilaga som du har redigerat finns kanske inte någon annanstans."
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Seçilmedi: Mail, açtığınız her ilişkinin bir kopyasını burada tutar; düzenlediğiniz bir kopya başka hiçbir yerde bulunmayabilir."
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Не вибрано: Пошта зберігає тут копію кожного вкладення, яке ви відкриваєте, а відредаговане вами вкладення може більше ніде не зберігатися."
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未选择:“邮件”会在此处为你打开的每个附件保留一个副本,而你编辑过的副本可能在其他任何地方都不存在。"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "未選取:「郵件」會在此處保留你打開的每個附件的副本,而你編輯過的副本可能不存在於其他任何地方。"
+ }
+ }
+ }
+ },
"Not selected: a folder called %@ could be anyone’s." : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
index fd27b71b..a73b76cf 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
@@ -272,6 +272,7 @@ extension HoldBack {
case .insideAnotherAppsFolder: "inside another app's folder"
case .beyondTheHelper: "needs an administrator, and Peel's helper may not move it"
case .keptByMacOS: "a cache macOS keeps for itself"
+ case .openedFromMail: "an attachment opened from Mail, which may be the only copy"
}
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
index 7756849c..0cc75588 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
@@ -61,6 +61,8 @@ public enum HoldBack: String, Sendable, Hashable {
case beyondTheHelper
/// A cache macOS keeps for its own services, which may be using it at any moment (`SystemCaches`).
case keptByMacOS
+ /// A copy Mail keeps of an attachment that was opened. One that was edited may exist nowhere else.
+ case openedFromMail
/// True when the item cannot be selected at all, rather than only left unselected.
public var cannotBeMoved: Bool {
diff --git a/Packages/PeelCore/Sources/PeelCore/Removal/RemovalGuard.swift b/Packages/PeelCore/Sources/PeelCore/Removal/RemovalGuard.swift
index cc5a4b56..c0116960 100644
--- a/Packages/PeelCore/Sources/PeelCore/Removal/RemovalGuard.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Removal/RemovalGuard.swift
@@ -29,6 +29,7 @@ struct RemovalGuard: Sendable {
let homeDirectories: [URL] = [home] + ProtectedData.accountFolders.map { home.appending(path: $0) }
paths += homeDirectories.map { $0.path(percentEncoded: false) }
paths += environment.locations.map { $0.url.path(percentEncoded: false) }
+ paths += SpaceInventory.emptiedFolders(in: environment).map { $0.path(percentEncoded: false) }
paths += ProtectedData.sharedHomeItems.map { home.appending(path: $0).path(percentEncoded: false) }
let trees = ProtectedData.homeTrees.map { home.appending(path: $0).path(percentEncoded: false) }
protectedPaths = Set(paths.flatMap(Self.names))
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift b/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
index 1b7ab62c..369c831c 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/SpaceRemoval.swift
@@ -57,7 +57,7 @@ public enum SpaceRemoval {
for child in children.removable where !Task.isCancelled {
let contents = await measure(child)
sizes[child] = contents.flatMap { $0.couldNotBeRead ? nil : $0.size }
- heldBack[child] = systemCaches.keeps(child) ? .keptByMacOS : HoldBack.seen(in: contents)
+ heldBack[child] = item.heldBack ?? (systemCaches.keeps(child) ? .keptByMacOS : HoldBack.seen(in: contents))
}
return Plan(
removable: children.removable, inUse: children.inUse, leftToDeveloper: children.leftToDeveloper, sizes: sizes,
diff --git a/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift b/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
index b0ec7502..7284e931 100644
--- a/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Space/SpaceReport.swift
@@ -25,6 +25,8 @@ public struct SpaceItem: Sendable, Hashable, Identifiable {
/// Nil when measuring one of its folders ran out of time or was refused. Unknown is not the same as empty.
public let size: Int64?
public let handling: Handling
+ /// Why nothing in this area is selected for the person, whatever each item holds.
+ public var heldBack: HoldBack?
public var isReadOnly: Bool {
if case .readOnly = handling { true } else { false }
@@ -55,6 +57,16 @@ public enum SpaceInventory {
let handling: SpaceItem.Handling
/// The folder inside every app's container (`Library/Containers/<identifier>`) that belongs to this area too.
var containerFolder: String?
+ var heldBack: HoldBack?
+
+ /// Each of `paths` on this Mac: one that starts with `/` is under `root`, the rest are in `home`.
+ func urls(home: URL, root: URL) -> [URL] {
+ paths.map { path in
+ path.hasPrefix("/")
+ ? root.appending(path: String(path.dropFirst()), directoryHint: .isDirectory)
+ : home.appending(path: path, directoryHint: .isDirectory)
+ }
+ }
}
/// The identifier of every area. Public so the app can check that it has words for each one: the words
@@ -205,6 +217,14 @@ public enum SpaceInventory {
handling: .trash,
containerFolder: "Data/Library/Caches"
),
+ // Sandboxed, Mail writes only the second folder. The first is what an older Mail left in the Library itself.
+ Definition(
+ id: "mail-downloads",
+ category: .library,
+ paths: ["Library/Mail Downloads", "Library/Containers/com.apple.mail/Data/Library/Mail Downloads"],
+ handling: .trash,
+ heldBack: .openedFromMail
+ ),
]
/// The total size of `urls`, or nil when any of them could not be measured. A folder a file provider owns
@@ -219,6 +239,13 @@ public enum SpaceInventory {
return total
}
+ /// The folders Space empties. Each stays itself, since Space moves what is inside, never the folder.
+ static func emptiedFolders(in environment: SearchEnvironment) -> [URL] {
+ definitions.filter { $0.handling == .trash }.flatMap {
+ $0.urls(home: environment.homeDirectory, root: environment.rootDirectory)
+ }
+ }
+
/// Every app's container, listed rather than matched with `glob`, which stops at 128 paths.
static func appContainers(in home: URL) -> [URL] {
let containers = home.appending(path: "Library/Containers", directoryHint: .isDirectory)
@@ -244,12 +271,7 @@ public enum SpaceInventory {
) async -> SpaceReport {
let containers = appContainers(in: home)
let wanted = definitions.compactMap { definition -> (Definition, [URL])? in
- let urls = definition.paths
- .map { path in
- path.hasPrefix("/")
- ? root.appending(path: String(path.dropFirst()), directoryHint: .isDirectory)
- : home.appending(path: path, directoryHint: .isDirectory)
- }
+ let urls = definition.urls(home: home, root: root)
.filter { FileManager.default.fileExists(atPath: PathPattern.comparablePath(of: $0)) }
+ (definition.containerFolder.map { folder in
containers.map { $0.appending(path: folder, directoryHint: .isDirectory) }.filter(\.isRealFolder)
@@ -277,7 +299,8 @@ public enum SpaceInventory {
category: definition.category,
urls: urls,
size: size,
- handling: definition.handling
+ handling: definition.handling,
+ heldBack: definition.heldBack
))
}
}
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
index 269032ca..1f84d35e 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceInventoryTests.swift
@@ -122,6 +122,25 @@ struct SpaceInventoryTests {
#expect(folders("logs").contains("org.example.chat/Data/Library/Logs"))
}
+ @Test func findsTheCopiesMailKeepsOfTheAttachmentsYouOpen() async throws {
+ let directory = try TemporaryDirectory()
+ let container = "Library/Containers/com.apple.mail/Data/Library/Mail Downloads"
+ try directory.file("Library/Mail Downloads/0C6E/Invoice.pdf", bytes: 8_000)
+ try directory.file("\(container)/5A1F/Plan.pages", bytes: 8_000)
+
+ let report = await SpaceInventory.scan(
+ home: directory.url, root: directory.url, minimumSize: 1, measure: FileSize.measure
+ )
+
+ let attachments = try #require(report.items.first { $0.id == "mail-downloads" })
+ #expect(attachments.urls == [
+ directory.url.appending(path: "Library/Mail Downloads", directoryHint: .isDirectory),
+ directory.url.appending(path: container, directoryHint: .isDirectory),
+ ])
+ #expect(attachments.handling == .trash)
+ #expect(attachments.heldBack == .openedFromMail)
+ }
+
@Test func everyDefinitionSaysWhatItIsAndWhoOwnsIt() {
for definition in SpaceInventory.definitions {
#expect(!definition.id.isEmpty)
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
index 3963d133..fa9bc763 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/SpaceRemovalTests.swift
@@ -162,6 +162,38 @@ struct SpaceRemovalTests {
#expect(plan.appsToQuit == ["Spotify"])
}
+ @Test func leavesEveryAttachmentMailKeptForThePersonToChoose() async throws {
+ let directory = try TemporaryDirectory()
+ let downloads = [
+ "home/Library/Mail Downloads", "home/Library/Containers/com.apple.mail/Data/Library/Mail Downloads",
+ ]
+ try directory.file("\(downloads[0])/0C6E/Invoice.pdf", bytes: 4_096)
+ try directory.file("\(downloads[1])/5A1F/Plan.pages", bytes: 4_096)
+ let item = SpaceItem(
+ id: "mail-downloads",
+ category: .library,
+ urls: downloads.map { directory.url.appending(path: $0, directoryHint: .isDirectory) },
+ size: 8_192,
+ handling: .trash,
+ heldBack: .openedFromMail
+ )
+ let mail = RunningCopies.Process(
+ identifier: 1, bundleIdentifier: "com.apple.mail", bundleURL: URL(filePath: "/System/Applications/Mail.app")
+ )
+
+ let closed = await SpaceRemoval.plan(for: item, environment: environment(directory), running: [:])
+ let open = await SpaceRemoval.plan(
+ for: item, environment: environment(directory), running: SpaceRemoval.namesOfRunningApps([mail])
+ )
+
+ #expect(closed.removable.map(\.lastPathComponent).sorted() == ["0C6E", "5A1F"])
+ #expect(closed.suggested.isEmpty)
+ #expect(Set(closed.heldBack.values) == [.openedFromMail])
+ #expect(closed.heldBack.count == 2)
+ #expect(open.removable.map(\.lastPathComponent) == ["0C6E"])
+ #expect(open.appsToQuit == ["Mail"])
+ }
+
/// A move asks again just before it moves anything, since an app opened since the plan may be writing to some
/// of these folders. It needs to know what may go, not how big it is, and it finds what a plan would.
@Test func theMovesCheckFindsWhatAPlanWould() async throws {
diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swift
index b1ff8363..c0c8e4f0 100644
--- a/Peel/Views/Presentation.swift
+++ b/Peel/Views/Presentation.swift
@@ -204,6 +204,8 @@ extension HoldBack {
"Left alone: only an administrator can move this, and Peel’s helper isn’t allowed to move it from here."
case .keptByMacOS:
"Not selected: macOS keeps this cache for its own services, which may be using it right now."
+ case .openedFromMail:
+ "Not selected: Mail keeps a copy here of each attachment you open, and one you edited may exist nowhere else."
}
}
}
diff --git a/Peel/Views/Space/SpaceText.swift b/Peel/Views/Space/SpaceText.swift
index b13658c5..a031ab46 100644
--- a/Peel/Views/Space/SpaceText.swift
+++ b/Peel/Views/Space/SpaceText.swift
@@ -141,6 +141,10 @@ extension SpaceItem {
title: "Sandboxed App Caches",
detail: "What sandboxed apps, such as those from the App Store, cached in their own containers. An app that is open keeps its caches, and those of Apple’s own apps are listed but never selected."
),
+ "mail-downloads": Words(
+ title: "Mail Downloads",
+ detail: "Copies of the attachments you opened in Mail. Mail deletes each with its message unless you edited it, so they are listed and never selected."
+ ),
]
}