From fb7350892758edc3207567a36e22bc3ff63fffdb Mon Sep 17 00:00:00 2001 From: Harry <109690906+harry-signal@users.noreply.github.com> Date: Mon, 12 Aug 2024 14:07:07 -0700 Subject: [PATCH] Log TSAttachment migration FileHandle error while replacing filename --- .../TSAttachmentMigration+AttachmentValidator.swift | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift b/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift index b6b7ccc163..1f16ebbe2d 100644 --- a/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift +++ b/SignalServiceKit/Storage/Database/IncrementalMigrations/TSAttachment/TSAttachmentMigration+AttachmentValidator.swift @@ -320,7 +320,9 @@ extension TSAttachmentMigration { do { return try TSAttachmentMigration.OWSImageSource(fileUrl: unencryptedFileUrl) } catch { - throw OWSAssertionError("Failed to open file handle image source") + var errorString = "\(error)" + errorString = errorString.replacingOccurrences(of: unencryptedFileUrl.lastPathComponent, with: "xxxx") + throw OWSAssertionError("Failed to open file handle image source \(errorString)") } }()