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.

Take the folders an app's own product file names with it

Țugui Dragoș820cbdfebbed
diff --git a/Localization/Peel/Localizable.xcstrings b/Localization/Peel/Localizable.xcstrings
index 999e7ce1..67c46c0b 100644
--- a/Localization/Peel/Localizable.xcstrings
+++ b/Localization/Peel/Localizable.xcstrings
@@ -77767,6 +77767,112 @@
}
}
},
+ "Named by the app’s own files" : {
+ "localizations" : {
+ "cs" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Název uvádějí vlastní soubory aplikace"
+ }
+ },
+ "de" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "In den eigenen Dateien der App genannt"
+ }
+ },
+ "es" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Lo nombran los propios archivos de la app"
+ }
+ },
+ "fr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nommé dans les fichiers de l’app elle-même"
+ }
+ },
+ "it" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nome indicato nei file dell’app stessa"
+ }
+ },
+ "ja" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "アプリ自身のファイルで指定された名前"
+ }
+ },
+ "ko" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "앱 자체 파일에 이름이 지정됨"
+ }
+ },
+ "nl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Genoemd in de eigen bestanden van de app"
+ }
+ },
+ "pl" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nazwa podana we własnych plikach aplikacji"
+ }
+ },
+ "pt" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Nomeado pelos próprios arquivos do app"
+ }
+ },
+ "ro" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Denumit în fișierele proprii ale aplicației"
+ }
+ },
+ "ru" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Имя указано в собственных файлах приложения"
+ }
+ },
+ "sv" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Namnges i appens egna filer"
+ }
+ },
+ "tr" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Uygulamanın kendi dosyalarında adlandırılmış"
+ }
+ },
+ "uk" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "Названо у власних файлах програми"
+ }
+ },
+ "zh-Hans" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "由App自己的文件命名"
+ }
+ },
+ "zh-Hant" : {
+ "stringUnit" : {
+ "state" : "translated",
+ "value" : "由App自己的檔案命名"
+ }
+ }
+ }
+ },
"Named like %@" : {
"localizations" : {
"cs" : {
diff --git a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
index 3dba5acf..84c8f876 100644
--- a/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
+++ b/Packages/PeelCore/Sources/PeelCommandLine/Support/Output.swift
@@ -276,6 +276,7 @@ extension MatchReason {
case .homebrewCask: "Homebrew cask"
case .managedByTheApp: "managed by the app"
case .updaterDownloads: "where its updater keeps its downloads"
+ case .namedByTheApp: "named by the app's own files"
}
}
}
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
index c2b8d2e1..d0734d93 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/AppInspector.swift
@@ -116,6 +116,7 @@ public enum AppInspector {
isSystemProtected: isSystemProtected
),
updaterFolder: electronConfiguration.flatMap(ElectronUpdater.downloadsFolder(fromConfiguration:)),
+ productFolders: ProductFolders.of(appAt: url),
webApp: bundleIdentifier.flatMap { WebApp.of(identifier: $0, info: info) },
carriesSystemExtensions: !AppExtensions.systemExtensions(carriedBy: url).isEmpty
)
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
index 647babc5..489bccdf 100644
--- a/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/InstalledApp.swift
@@ -30,6 +30,8 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
public let updateFeed: UpdateFeed?
/// The folder electron-updater keeps this app's downloads in, as its `app-update.yml` names it.
public let updaterFolder: String?
+ /// The folders the app's own product file names for its data (`ProductFolders`).
+ public let productFolders: [ProductFolder]
/// Whether this is Peel, which is removed only from its own Settings, where the helper and the login item
/// are unregistered first. Also true for the bundle the running code sits inside, such as the Peel that
/// embeds the `peel` tool, whatever its name or identifier.
@@ -68,6 +70,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
dateAdded: Date? = nil,
updateFeed: UpdateFeed? = nil,
updaterFolder: String? = nil,
+ productFolders: [ProductFolder] = [],
webApp: WebApp? = nil,
carriesSystemExtensions: Bool = false
) {
@@ -91,6 +94,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
self.webApp = webApp
self.updateFeed = updateFeed
self.updaterFolder = updaterFolder
+ self.productFolders = productFolders
self.carriesSystemExtensions = carriesSystemExtensions
let path = PathPattern.comparablePath(of: url)
isPeelItself = Self.isPeel(self.bundleIdentifier, at: path)
@@ -148,6 +152,7 @@ public struct InstalledApp: Sendable, Hashable, Identifiable {
dateAdded: dateAdded,
updateFeed: updateFeed,
updaterFolder: updaterFolder,
+ productFolders: productFolders,
webApp: webApp,
carriesSystemExtensions: carriesSystemExtensions
)
diff --git a/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift b/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift
new file mode 100644
index 00000000..a741a49c
--- /dev/null
+++ b/Packages/PeelCore/Sources/PeelCore/Apps/ProductFolders.swift
@@ -0,0 +1,89 @@
+import Foundation
+
+/// A folder an app's own product file names for its data, given from the home.
+public struct ProductFolder: Sendable, Hashable {
+ /// Such as `.vscode-insiders` or `Library/Caches/JetBrains/IdeaIC2025.2`.
+ public let path: String
+ /// What the app writes inside once it has run, without which the folder is not taken as the app's. Nil for a
+ /// folder whose name carries the app's release.
+ public let proof: String?
+ /// What inside holds the person's own work, such as a JetBrains IDE's scratch files and query consoles.
+ public let work: [String]
+
+ public init(path: String, proof: String?, work: [String] = []) {
+ self.path = path
+ self.proof = proof
+ self.work = work
+ }
+
+ /// Whether `url` is this folder in `home` and holds its proof.
+ func isFolder(at url: URL, home: String) -> Bool {
+ let folder = URL(filePath: home, directoryHint: .isDirectory).appending(path: path)
+ guard PathPattern.comparablePath(of: url).lowercased() == PathPattern.comparablePath(of: folder).lowercased()
+ else { return false }
+ guard let proof else { return true }
+ var info = stat()
+ return lstat(url.appending(path: proof).path(percentEncoded: false), &info) == 0
+ }
+
+ /// Whether the folder at `url` holds anything in one of its `work` folders.
+ func holdsWork(at url: URL) -> Bool {
+ work.contains { name in
+ let folder = url.appending(path: name).path(percentEncoded: false)
+ return (try? FileManager.default.contentsOfDirectory(atPath: folder))?.isEmpty == false
+ }
+ }
+}
+
+/// The folders an app's own product file names for its data.
+enum ProductFolders {
+ /// What a JetBrains IDE's launcher reads to name its folders.
+ static let jetBrainsFile = "Contents/Resources/product-info.json"
+ /// What a code editor built on VS Code reads to name its folders.
+ static let vsCodeFile = "Contents/Resources/app/product.json"
+
+ static func of(appAt url: URL) -> [ProductFolder] {
+ jetBrainsFolders(in: json(at: url.appending(path: jetBrainsFile))) + vsCodeFolders(in: vsCodeProduct(of: url))
+ }
+
+ static func vsCodeProduct(of app: URL) -> [String: Any]? {
+ json(at: app.appending(path: vsCodeFile))
+ }
+
+ /// A JetBrains IDE keeps its settings, caches and logs in `<productVendor>/<dataDirectoryName>` inside
+ /// Application Support, Caches and Logs. Only a data directory named with its release, such as `IdeaIC2025.2`, is
+ /// believed: a plain name could be another product's folder.
+ static func jetBrainsFolders(in product: [String: Any]?) -> [ProductFolder] {
+ guard let vendor = product?["productVendor"] as? String, let name = product?["dataDirectoryName"] as? String,
+ isOneName(vendor), isOneName(name), Naming.withoutAttachedVersion(name) != nil
+ else { return [] }
+ return [
+ ProductFolder(path: "Library/Application Support/\(vendor)/\(name)", proof: nil, work: ["scratches", "consoles"]),
+ ProductFolder(path: "Library/Caches/\(vendor)/\(name)", proof: nil),
+ ProductFolder(path: "Library/Logs/\(vendor)/\(name)", proof: nil),
+ ]
+ }
+
+ /// A code editor built on VS Code keeps its extensions in `~/<dataFolderName>`, beside the `argv.json` it writes
+ /// there, and what its windows share in `~/<sharedDataFolderName>/sharedStorage`. Each folder is taken only while
+ /// it holds what VS Code writes there.
+ static func vsCodeFolders(in product: [String: Any]?) -> [ProductFolder] {
+ [("dataFolderName", "argv.json"), ("sharedDataFolderName", "sharedStorage")].compactMap { key, proof in
+ guard let name = product?[key] as? String, name.hasPrefix("."), isOneName(String(name.dropFirst()))
+ else { return nil }
+ return ProductFolder(path: name, proof: proof)
+ }
+ }
+
+ /// One plain name: not hidden, and nothing but letters, digits, spaces, `-`, `_` and `.`.
+ private static func isOneName(_ name: String) -> Bool {
+ !name.isEmpty && !name.hasPrefix(".")
+ && name.allSatisfy { $0.isLetter || $0.isNumber || " -_.".contains($0) }
+ }
+
+ private static func json(at url: URL) -> [String: Any]? {
+ BoundedRead.data(at: url, maximum: 1_024 * 1_024).flatMap {
+ try? JSONSerialization.jsonObject(with: $0) as? [String: Any]
+ }
+ }
+}
diff --git a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
index 9cb8305f..23847f7b 100644
--- a/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Developer/DeveloperCaches.swift
@@ -1346,12 +1346,10 @@ public enum DeveloperCaches {
/// `nameShort` in the app's `product.json`, the name VS Code keeps its data under.
private static func vsCodeProductName(of app: InstalledApp) -> String? {
- let file = app.url.appending(path: "Contents/Resources/app/product.json")
- guard let data = BoundedRead.data(at: file, maximum: 1_024 * 1_024),
- let product = try? JSONSerialization.jsonObject(with: data) as? [String: Any],
- product["dataFolderName"] is String, let name = product["nameShort"] as? String
- else { return nil }
- return name
+ guard let product = ProductFolders.vsCodeProduct(of: app.url), product["dataFolderName"] is String else {
+ return nil
+ }
+ return product["nameShort"] as? String
}
/// Also the state of workspaces that are gone.
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
index e95b5da1..42019405 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/Leftover.swift
@@ -29,6 +29,8 @@ public enum MatchReason: String, Sendable, Hashable {
case managedByTheApp
/// The folder the app's own settings name for what its updater downloads (`InstalledApp.updaterFolder`).
case updaterDownloads
+ /// A folder the app's own product file names for its data (`InstalledApp.productFolders`).
+ case namedByTheApp
}
public enum MatchConfidence: Int, Sendable, Hashable, Comparable {
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverMatcher.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverMatcher.swift
index c4cbedd2..7925ba19 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverMatcher.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverMatcher.swift
@@ -76,6 +76,19 @@ struct LeftoverMatcher: Sendable {
)
}
+ /// This app's claim on a folder its own product file names for its data.
+ func productFolder(at url: URL, home: String) -> LeftoverMatch? {
+ guard let folder = target.productFolders.first(where: { $0.isFolder(at: url, home: home) }) else { return nil }
+ let naming = others.filter { $0.productFolders.contains { $0.path.lowercased() == folder.path.lowercased() } }
+ return LeftoverMatch(
+ reason: .namedByTheApp,
+ confidence: .certain,
+ sharedWith: Set(naming.filter { !$0.isACopy(of: target) }.map(\.reference)).sorted(),
+ otherCopies: naming.filter { $0.isACopy(of: target) }.map(\.url),
+ heldBack: folder.holdsWork(at: url) ? .holdsWorkMadeWithTheApp : nil
+ )
+ }
+
/// This app's claim on the item called `fileName` in a location of `kind`, found at `url` when the caller knows it.
func match(fileName: String, kind: SearchLocation.Kind, at url: URL? = nil) -> LeftoverMatch? {
let key = Self.key(from: fileName, kind: kind)
@@ -288,7 +301,7 @@ extension LeftoverMatcher {
family = switch reason {
case .bundleIdentifier, .embeddedBundleIdentifier, .applicationGroup, .bundleIdentifierPrefix,
.launchdJob, .linksToTheApp, .nativeMessagingHost, .installerReceipt, .homebrewReceipt,
- .leadsIntoItsHomebrewReceipt, .managedByTheApp, .updaterDownloads:
+ .leadsIntoItsHomebrewReceipt, .managedByTheApp, .updaterDownloads, .namedByTheApp:
.identifier
case .name, .namePrefix, .homebrewCask: .name
case .teamIdentifier, .vendorPrefix: .maker
@@ -311,7 +324,8 @@ extension LeftoverMatcher {
// A job's or a manifest's program, or a link's target, lies inside the app's bundle, which no other app
// can share.
case .launchdJob, .linksToTheApp, .nativeMessagingHost, .leadsIntoItsHomebrewReceipt: 8
- case .bundleIdentifier, .installerReceipt, .homebrewReceipt, .managedByTheApp, .updaterDownloads: 7
+ case .bundleIdentifier, .installerReceipt, .homebrewReceipt, .managedByTheApp, .updaterDownloads,
+ .namedByTheApp: 7
case .embeddedBundleIdentifier, .applicationGroup: 6
case .bundleIdentifierPrefix: 5
case .name: 4
@@ -348,6 +362,7 @@ extension LeftoverMatcher {
let isApplesOwn: Bool
let isASafariWebApp: Bool
let updaterFolder: String?
+ let productFolders: [ProductFolder]
init(_ app: InstalledApp) {
url = app.url
@@ -374,6 +389,7 @@ extension LeftoverMatcher {
isASafariWebApp = app.isASafariWebApp
// Only electron-builder's `<name>-updater`: any other name could be a folder other programs share.
updaterFolder = app.updaterFolder.map { $0.lowercased() }.flatMap { $0.hasSuffix("-updater") ? $0 : nil }
+ productFolders = app.productFolders
}
/// Whether this is another copy of `other`: the same app, known by its identifier, somewhere else.
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverScanner.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverScanner.swift
index 3c6f8515..8d23653d 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverScanner.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/LeftoverScanner.swift
@@ -437,6 +437,7 @@ public struct LeftoverScanner: Sendable {
// A system extension macOS activated is its own to remove: it uninstalls one with the app it came in.
guard url.pathExtension.lowercased() != "systemextension" else { return nil }
if let updaters = matcher.updatersFolder(at: url, home: home) { return updaters }
+ if let named = matcher.productFolder(at: url, home: home) { return named }
let byName = DeclaredIdentifier.nameSaysNothing(of: url, kind: kind)
? nil : matcher.match(fileName: name, kind: kind, at: url)
guard byName == nil || DeclaredIdentifier.outranksTheName(of: url, kind: kind) else { return byName }
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
index c9c01a37..eaaf2417 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/LeftoverScannerTests.swift
@@ -172,6 +172,52 @@ struct LeftoverScannerTests {
#expect(!folder.match.isRecommended)
}
+ @Test func takesTheFoldersTheAppsOwnProductFileNames() async throws {
+ let directory = try TemporaryDirectory()
+ try directory.file("home/.example-editor/argv.json")
+ try directory.directory("home/.example-editor-shared/sharedStorage")
+ try directory.file("home/Library/Application Support/ExampleVendor/ExampleIDE2025.2/options/ui.xml")
+ try directory.file("home/Library/Application Support/ExampleVendor/ExampleIDE2025.2/scratches/scratch.txt")
+ try directory.file("home/Library/Caches/ExampleVendor/ExampleIDE2025.2/index/a", bytes: 64)
+ try directory.file("home/.other-editor/settings.json")
+ let editor = InstalledApp(
+ url: URL(filePath: "/Applications/Example Editor.app"), bundleIdentifier: "org.example.editor",
+ name: "Example Editor", productFolders: ProductFolders.vsCodeFolders(in: [
+ "dataFolderName": ".example-editor", "sharedDataFolderName": ".example-editor-shared",
+ ])
+ )
+ let ide = InstalledApp(
+ url: URL(filePath: "/Applications/Example IDE.app"), bundleIdentifier: "org.example.ide",
+ name: "Example IDE", productFolders: ProductFolders.jetBrainsFolders(in: [
+ "productVendor": "ExampleVendor", "dataDirectoryName": "ExampleIDE2025.2",
+ ])
+ )
+ let other = InstalledApp(
+ url: URL(filePath: "/Applications/Other Editor.app"), bundleIdentifier: "org.example.other",
+ name: "Other Editor", productFolders: ProductFolders.vsCodeFolders(in: ["dataFolderName": ".other-editor"])
+ )
+ let apps = [editor, ide, other]
+ let scanner = LeftoverScanner(environment: environment(in: directory))
+
+ let named = { (app: InstalledApp) in
+ await scanner.scan(app, installedApps: apps).leftovers.filter { $0.match.reason == .namedByTheApp }
+ }
+ let editors = await named(editor)
+ let ides = await named(ide)
+ let others = await named(other)
+
+ let editorFolders = Set(editors.map { $0.url.lastPathComponent })
+ let place = { (leftover: Leftover) in leftover.url.deletingLastPathComponent().deletingLastPathComponent() }
+ let ideFolders = Set(ides.map { place($0).lastPathComponent })
+ #expect(editorFolders == [".example-editor", ".example-editor-shared"])
+ #expect(ideFolders == ["Application Support", "Caches"])
+ #expect((editors + ides).allSatisfy { $0.match.confidence == .certain })
+ let unselected = (editors + ides).filter { !$0.match.isRecommended }
+ #expect(unselected.map { $0.match.heldBack } == [.holdsWorkMadeWithTheApp])
+ #expect(unselected.first.map { place($0).lastPathComponent } == "Application Support")
+ #expect(others.isEmpty)
+ }
+
/// A preference file whose bytes are not a property list holds settings nobody can read, so its row says so. A
/// file that reads as one does not.
@Test func marksAPreferenceFileThatIsNoPropertyList() async throws {
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift
new file mode 100644
index 00000000..da11b987
--- /dev/null
+++ b/Packages/PeelCore/Tests/PeelCoreTests/ProductFoldersTests.swift
@@ -0,0 +1,46 @@
+import Foundation
+@testable import PeelCore
+import Testing
+
+struct ProductFoldersTests {
+ @Test func readsTheFoldersAnIDEAndACodeEditorName() throws {
+ let directory = try TemporaryDirectory()
+ let ide = try directory.directory("Applications/Example IDE.app")
+ try directory.file(
+ "Applications/Example IDE.app/Contents/Resources/product-info.json",
+ contents: Data(#"{"productVendor": "ExampleVendor", "dataDirectoryName": "ExampleIDE2025.2"}"#.utf8)
+ )
+ let editor = try directory.directory("Applications/Example Editor.app")
+ try directory.file(
+ "Applications/Example Editor.app/Contents/Resources/app/product.json",
+ contents: Data(#"{"dataFolderName": ".example-editor", "sharedDataFolderName": ".example-editor-shared"}"#.utf8)
+ )
+
+ #expect(ProductFolders.of(appAt: ide) == [
+ ProductFolder(
+ path: "Library/Application Support/ExampleVendor/ExampleIDE2025.2", proof: nil,
+ work: ["scratches", "consoles"]
+ ),
+ ProductFolder(path: "Library/Caches/ExampleVendor/ExampleIDE2025.2", proof: nil),
+ ProductFolder(path: "Library/Logs/ExampleVendor/ExampleIDE2025.2", proof: nil),
+ ])
+ #expect(ProductFolders.of(appAt: editor) == [
+ ProductFolder(path: ".example-editor", proof: "argv.json"),
+ ProductFolder(path: ".example-editor-shared", proof: "sharedStorage"),
+ ])
+ #expect(ProductFolders.of(appAt: try directory.directory("Applications/Plain.app")).isEmpty)
+ }
+
+ @Test func believesOnlyTheNamesTheToolsWrite() {
+ let ide = { (vendor: String, name: String) in
+ ProductFolders.jetBrainsFolders(in: ["productVendor": vendor, "dataDirectoryName": name])
+ }
+ #expect(ide("ExampleVendor", "Chrome").isEmpty)
+ #expect(ide("../ExampleVendor", "ExampleIDE2025.2").isEmpty)
+ #expect(ide("ExampleVendor", "../ExampleIDE2025.2").isEmpty)
+ #expect(ide(".ExampleVendor", "ExampleIDE2025.2").isEmpty)
+ for name in ["example", ".", "..", ".config/example", ""] {
+ #expect(ProductFolders.vsCodeFolders(in: ["dataFolderName": name]).isEmpty, "\(name)")
+ }
+ }
+}
diff --git a/Peel/Views/Presentation.swift b/Peel/Views/Presentation.swift
index 78a21f37..8009d1dd 100644
--- a/Peel/Views/Presentation.swift
+++ b/Peel/Views/Presentation.swift
@@ -21,6 +21,7 @@ extension MatchReason {
case .homebrewCask: "Listed by the Homebrew cask"
case .managedByTheApp: "Managed by the app"
case .updaterDownloads: "Where the app’s updater keeps its downloads"
+ case .namedByTheApp: "Named by the app’s own files"
}
}
}
diff --git a/SAFETY.md b/SAFETY.md
index cdc8a3da..bdaf86d1 100644
--- a/SAFETY.md
+++ b/SAFETY.md
@@ -274,6 +274,12 @@ Only matches Peel is `certain` or `likely` about, and only when nothing else ins
downloads in the folder the app's own settings name, the app's name and `-updater`, in `~/Library/Caches` or, before
electron-updater 6, in `~/Library/Application Support/Caches`. That folder is the app's whatever the app is called,
and shared only with another app, or another copy of it, that names the same folder.
+- **The folders the app's own product file names go with it.** A JetBrains IDE names its settings, caches, and logs
+ folders in its `product-info.json`, such as `JetBrains/IdeaIC2025.2` in Application Support, Caches, and Logs, and
+ only a name that carries the release is believed. A code editor built on VS Code names its extensions folder and its
+ shared data folder in its `product.json`, such as `~/.vscode-insiders`, taken only while it holds what VS Code
+ writes there (`argv.json`, `sharedStorage`). Each is shared only with another app, or another copy, naming the same
+ folder, and an IDE's settings folder with your scratch files or query consoles inside is shown and never selected.
- **A system extension is left to macOS**, which removes it only when the app that uses it goes to the Trash in
Finder, so the copy macOS installed is never listed with the app, and the app itself is moved from no page of
Peel: its own page, Package Receipts and the Homebrew page all leave it to Finder.