Fix a crash when attempting to send a bug report with excessively large logs. (#4243)

* Alert the user when there are excessively large log files.
This commit is contained in:
Doug
2025-06-24 09:47:20 +01:00
committed by GitHub
parent 0bf6ed1c63
commit 0f9d700c99
10 changed files with 50 additions and 16 deletions
@@ -80,8 +80,8 @@ class BugReportService: NSObject, BugReportServiceProtocol {
params.append(MultipartFormData(key: "label", type: .text(value: label)))
}
if bugReport.includeLogs {
let logAttachments = await zipFiles(Tracing.logFiles)
if let logFiles = bugReport.logFiles {
let logAttachments = await zipFiles(logFiles)
for url in logAttachments.files {
params.append(MultipartFormData(key: "compressed-log", type: .file(url: url)))
}