From: David ‘Bombe’ Roden Date: Fri, 22 Jan 2010 21:22:28 +0000 (+0100) Subject: Fix change detection to include “changed name” attribute. X-Git-Tag: 0.9~13 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=e5a389dce31c983bb61c82b82f58b30b8d656923;p=jSite.git Fix change detection to include “changed name” attribute. --- diff --git a/src/de/todesbaum/jsite/application/FileOption.java b/src/de/todesbaum/jsite/application/FileOption.java index 9927c33..31e6698 100644 --- a/src/de/todesbaum/jsite/application/FileOption.java +++ b/src/de/todesbaum/jsite/application/FileOption.java @@ -35,6 +35,9 @@ public class FileOption { /** The default for the custom key. */ private static final String DEFAULT_CUSTOM_KEY = "CHK@"; + /** The default changed name. */ + private static final String DEFAULT_CHANGED_NAME = null; + /** The default container. */ private static final String DEFAULT_CONTAINER = ""; @@ -81,6 +84,7 @@ public class FileOption { insert = DEFAULT_INSERT; insertRedirect = DEFAULT_INSERT_REDIRECT; customKey = DEFAULT_CUSTOM_KEY; + changedName = DEFAULT_CHANGED_NAME; this.defaultMimeType = defaultMimeType; mimeType = defaultMimeType; container = DEFAULT_CONTAINER; @@ -303,6 +307,9 @@ public class FileOption { if (!customKey.equals(DEFAULT_CUSTOM_KEY)) { return true; } + if (((changedName != null) && !changedName.equals(DEFAULT_CHANGED_NAME)) || ((DEFAULT_CHANGED_NAME != null) && !DEFAULT_CHANGED_NAME.equals(changedName))) { + return true; + } if (!defaultMimeType.equals(mimeType)) { return true; }