Fix the bug report size check and a bad swiftlint command. (#5045)
This commit is contained in:
@@ -232,7 +232,7 @@ class BugReportService: NSObject, BugReportServiceProtocol {
|
|||||||
// **However:** given our gzip library compresses in memory it is possible to OOM
|
// **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.
|
// on files that will obviously be thrown away, so check the uncompressed size too.
|
||||||
let uncompressedSizeThreshold = maxUploadSize * 5
|
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)")
|
MXLog.error("Uncompressed logs too large, skipping attachment: \(url.lastPathComponent)")
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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),
|
// 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.
|
// so instead lets deliver the default generic notification and avoid attempting to process the notification.
|
||||||
guard Self.targetConfiguration != nil else {
|
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.")
|
print("Device is locked after reboot, delivering the unmodified notification.")
|
||||||
return contentHandler(request.content)
|
return contentHandler(request.content)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user