From: David ‘Bombe’ Roden Date: Sat, 17 Mar 2012 21:37:59 +0000 (+0100) Subject: Don’t insert a redirect if force-insert is set. X-Git-Tag: 0.10-rc1~20 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=76c0336dba1b21104b99cd1be7ebc9930d39d8a3;p=jSite.git Don’t insert a redirect if force-insert is set. --- diff --git a/src/de/todesbaum/jsite/application/ProjectInserter.java b/src/de/todesbaum/jsite/application/ProjectInserter.java index 404fc10..7f64b65 100644 --- a/src/de/todesbaum/jsite/application/ProjectInserter.java +++ b/src/de/todesbaum/jsite/application/ProjectInserter.java @@ -282,7 +282,7 @@ public class ProjectInserter implements FileScannerListener, Runnable { if (fileOption.isInsert()) { fileOption.setCurrentHash(file.getHash()); /* check if file was modified. */ - if (file.getHash().equals(fileOption.getLastInsertHash())) { + if (!fileOption.isForceInsert() && 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);