From 9f4e6d2609a5ce428720fa5359381a416a933621 Mon Sep 17 00:00:00 2001 From: Brent Simmons Date: Sat, 29 Nov 2025 11:16:01 -0800 Subject: [PATCH] Remove deliberate crash when failing to delete folder for account. --- Modules/Account/Sources/Account/AccountManager.swift | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/Modules/Account/Sources/Account/AccountManager.swift b/Modules/Account/Sources/Account/AccountManager.swift index 828eae170..15dd66a15 100644 --- a/Modules/Account/Sources/Account/AccountManager.swift +++ b/Modules/Account/Sources/Account/AccountManager.swift @@ -170,9 +170,11 @@ public final class AccountManager: UnreadCountProvider { do { try FileManager.default.removeItem(atPath: account.dataFolder) } + catch let error as CocoaError where error.code == .fileNoSuchFile { + // Already doesn’t exist. + } catch { - assertionFailure("Could not create folder for OnMyMac account.") - abort() + // TODO: add logging and/or reporting to user. No need to crash here. } updateUnreadCount()