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");