Fixed that filename may is null

This commit is contained in:
dankito 2024-11-21 21:49:58 +01:00
parent a2d34e217f
commit 2373717283
1 changed files with 1 additions and 1 deletions

View File

@ -144,7 +144,7 @@ class MailReader(
}
private fun tryToReadEInvoice(part: Part, mediaType: String?): Invoice? = try {
val filename = part.fileName.lowercase()
val filename = part.fileName?.lowercase() ?: ""
if (filename.endsWith(".pdf") || mediaType == "application/pdf" || mediaType == "application/octet-stream") {
eInvoiceReader.extractFromPdf(part.inputStream)