From 3c1268861fad63a64a21fc2d46041ca736e48be9 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Mar 2012 21:10:46 +0100 Subject: [PATCH] Use changed name when inserting a file. --- src/de/todesbaum/jsite/application/ProjectInserter.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index d16be3e..1f5e8ef 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -331,13 +331,13 @@ public class ProjectInserter implements FileScannerListener, Runnable { try { long[] fileLength = new long[1]; InputStream fileEntryInputStream = createFileInputStream(filename, fileOption, edition, fileLength); - fileEntry = new DirectFileEntry(filename, fileOption.getMimeType(), fileEntryInputStream, fileLength[0]); + fileEntry = new DirectFileEntry(fileOption.hasChangedName() ? fileOption.getChangedName() : filename, fileOption.getMimeType(), fileEntryInputStream, fileLength[0]); } catch (IOException ioe1) { /* ignore, null is returned. */ } } else { if (fileOption.isInsertRedirect()) { - fileEntry = new RedirectFileEntry(filename, fileOption.getMimeType(), fileOption.getCustomKey()); + fileEntry = new RedirectFileEntry(fileOption.hasChangedName() ? fileOption.getChangedName() : filename, fileOption.getMimeType(), fileOption.getCustomKey()); } } return fileEntry; -- 2.7.4