Revert "Set the EarlyEncode flag on insert."
[jSite.git] / src / de / todesbaum / jsite / application / FileOption.java
index 9927c33..71809c9 100644 (file)
@@ -1,6 +1,5 @@
 /*
- * jSite - a tool for uploading websites into Freenet Copyright (C) 2006 David
- * Roden
+ * jSite - FileOption.java - Copyright © 2006–2011 David Roden
  *
  * This program is free software; you can redistribute it and/or modify it under
  * the terms of the GNU General Public License as published by the Free Software
@@ -35,6 +34,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 +83,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 +306,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;
                }