Fix the bug report size check and a bad swiftlint command. (#5045)

This commit is contained in:
Doug
2026-02-03 13:10:49 +00:00
committed by GitHub
parent 0b994002cc
commit e4b2c235de
2 changed files with 3 additions and 2 deletions

View File

@@ -232,7 +232,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
// **However:** given our gzip library compresses in memory it is possible to OOM
// on files that will obviously be thrown away, so check the uncompressed size too.
let uncompressedSizeThreshold = maxUploadSize * 5
if try FileManager.default.sizeForItem(at: url) > maxUploadSize {
if try FileManager.default.sizeForItem(at: url) > uncompressedSizeThreshold {
MXLog.error("Uncompressed logs too large, skipping attachment: \(url.lastPathComponent)")
return
}

View File

@@ -76,7 +76,8 @@ class NotificationServiceExtension: UNNotificationServiceExtension {
// to be able to create a session (and even if we could, we would be missing the lightweightTokioRuntime),
// so instead lets deliver the default generic notification and avoid attempting to process the notification.
guard Self.targetConfiguration != nil else {
// swiftlint:disable:next print_deprecation (MXLog isn't configured)
// MXLog isn't configured
// swiftlint:disable:next print_deprecation
print("Device is locked after reboot, delivering the unmodified notification.")
return contentHandler(request.content)
}