From 7f22a7d186c5221d0cfdab4c52cf95d2106dedc8 Mon Sep 17 00:00:00 2001 From: j-dimension Date: Thu, 24 Oct 2024 21:00:51 +0200 Subject: [PATCH] fixed issue with attachments file extensions being stripped off --- .../java/com/jdimension/jlawyer/timer/MailboxScannerTask.java | 3 +++ 1 file changed, 3 insertions(+) diff --git a/j-lawyer-server/j-lawyer-server-war/src/java/com/jdimension/jlawyer/timer/MailboxScannerTask.java b/j-lawyer-server/j-lawyer-server-war/src/java/com/jdimension/jlawyer/timer/MailboxScannerTask.java index 0f5e9f5d9..855fb717f 100644 --- a/j-lawyer-server/j-lawyer-server-war/src/java/com/jdimension/jlawyer/timer/MailboxScannerTask.java +++ b/j-lawyer-server/j-lawyer-server-war/src/java/com/jdimension/jlawyer/timer/MailboxScannerTask.java @@ -1312,6 +1312,9 @@ private boolean saveToCase(Message msg, Date received, ArchiveFileBean toCase, A // remove any extension, because of the template it might be somewhere in the middle of the new name docName = docName.replace("." + extension, ""); + + // add back extension + docName = ServerFileUtils.preserveExtension(newName, docName); if (caseSvc.doesDocumentExistUnrestricted(toCase.getId(), docName)) { log.error("There is already a document '" + docName + "' in case " + toCase.getFileNumber() + " - skipping this attachment");