From 676508d76c058279be144efdc58ae6d7a34db783 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 17 Mar 2012 14:06:48 +0100 Subject: [PATCH] Always set the current hash when inserting. --- src/de/todesbaum/jsite/application/ProjectInserter.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index f447eed..158a0bb 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -280,13 +280,13 @@ public class ProjectInserter implements FileScannerListener, Runnable { String filename = file.getFilename(); FileOption fileOption = project.getFileOption(filename); if (fileOption.isInsert()) { + fileOption.setCurrentHash(file.getHash()); /* check if file was modified. */ if (file.getHash().equals(fileOption.getLastInsertHash())) { /* only insert a redirect. */ logger.log(Level.FINE, String.format("Inserting redirect to edition %d for %s.", fileOption.getLastInsertEdition(), filename)); return new RedirectFileEntry(filename, fileOption.getMimeType(), "SSK@" + project.getRequestURI() + "/" + project.getPath() + "-" + fileOption.getLastInsertEdition() + "/" + filename); } - fileOption.setCurrentHash(file.getHash()); try { long[] fileLength = new long[1]; InputStream fileEntryInputStream = createFileInputStream(filename, fileOption, edition, fileLength); -- 2.7.4