fix cleaning up if errors occur

This commit is contained in:
leminlimez committed 2025-06-01 01:05:23 -04:00
1 parent b26b9f3ac7
commit 89704a4238
2 files changed
+5 -3

No files matched your search

@@ -119,6 +119,9 @@ class PosterBoardManager {
static func applyTendies(_ urls: [URL], appHash: String) throws {
let _ = try SymHandler.createDescriptorsSymlink(appHash: appHash)
defer {
SymHandler.cleanup()
}
for url in urls {
// scope the resource
let accessing = url.startAccessingSecurityScopedResource()
@@ -146,6 +149,5 @@ class PosterBoardManager {
try? FileManager.default.removeItem(at: descriptors)
}
SymHandler.cleanup()
}
}