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.

Keep OBS's scene collections and profiles for the person to choose

Țugui Dragoș2ce7374dd15e
diff --git a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
index 92685b2b..854d22f0 100644
--- a/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
+++ b/Packages/PeelCore/Sources/PeelCore/Leftovers/KeptOnlyHere.swift
@@ -45,6 +45,9 @@ enum KeptOnlyHere {
// Postgres.app's "Installing Postgres.app": its default data directory is `Postgres/var-XX`, and deleting the
// data directories is an optional step of uninstalling it.
("Library/Application Support/Postgres", nil, .holdsWorkMadeWithTheApp),
+ // OBS Studio keeps its profiles and scene collections in `obs-studio/basic` in its configuration folder
+ // (`frontend/OBSApp.cpp`), and nowhere else.
+ ("Library/Application Support/obs-studio", "basic", .holdsWorkMadeWithTheApp),
]
static func reason(for path: String, home: String) -> HoldBack? {
diff --git a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
index d1ce5980..2f79122b 100644
--- a/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
+++ b/Packages/PeelCore/Tests/PeelCoreTests/KeptOnlyHereTests.swift
@@ -24,6 +24,8 @@ struct KeptOnlyHereTests {
("Library/Application Support/Postgres/var-17", .holdsWorkMadeWithTheApp),
("Library/Application Support/.com.example.notes.backups", .holdsWorkMadeWithTheApp),
("Library/Application Support/Example/Backups", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/obs-studio", .holdsWorkMadeWithTheApp),
+ ("Library/Application Support/obs-studio/basic/scenes/Untitled.json", .holdsWorkMadeWithTheApp),
]
for (path, reason) in held {
#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home) == reason, "\(path)")
@@ -38,6 +40,7 @@ struct KeptOnlyHereTests {
"Library/Application Support/Tunnelblick/Logs", "Library/Logs/Viscosity",
"Library/Group Containers/group.net.whatsapp.family",
"Library/Application Support/Steam Link", "Library/Caches/Postgres", "Library/Application Support/Backupify",
+ "Library/Application Support/obs-studio/logs",
]
for path in free {
#expect(KeptOnlyHere.reason(for: "\(home)/\(path)", home: home) == nil, "\(path)")