From e5a389dce31c983bb61c82b82f58b30b8d656923 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Fri, 22 Jan 2010 22:22:28 +0100 Subject: [PATCH] =?utf8?q?Fix=20change=20detection=20to=20include=20?= =?utf8?q?=E2=80=9Cchanged=20name=E2=80=9D=20attribute.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/de/todesbaum/jsite/application/FileOption.java | 7 +++++++ 1 file changed, 7 insertions(+) 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; } -- 2.7.4