Merge branch 'main' into dev
Some checks are pending
Build and Release / Build IPA (push) Waiting to run
Build and Release / Build Mac Catalyst (push) Waiting to run

This commit is contained in:
cranci 2025-06-17 23:58:22 +02:00 committed by GitHub
commit a9e1328cec
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -116,6 +116,17 @@ struct SoraApp: App {
for url in tmpContents {
try fileManager.removeItem(at: url)
}
let parentURL = tmpURL.deletingLastPathComponent()
let parentContents = try fileManager.contentsOfDirectory(at: parentURL, includingPropertiesForKeys: [.isDirectoryKey])
for url in parentContents {
if url.lastPathComponent.hasPrefix("com.apple.UserManagedAssets") {
var isDir: ObjCBool = false
if fileManager.fileExists(atPath: url.path, isDirectory: &isDir), isDir.boolValue {
try fileManager.removeItem(at: url)
}
}
}
} catch {
Logger.shared.log("Failed to clear tmp folder: \(error.localizedDescription)", type: "Error")
}