From: David ‘Bombe’ Roden Date: Tue, 16 Jun 2015 04:37:31 +0000 (+0200) Subject: Merge branch 'feature/fix-clone-project' into next X-Git-Tag: 0.13^2~25 X-Git-Url: https://git.pterodactylus.net/?p=jSite.git;a=commitdiff_plain;h=db47bd203d7adacccea6c83da15acec21f793675;hp=189a668a4b0fa2cdb413e1ce0ac162b34befb6e1 Merge branch 'feature/fix-clone-project' into next --- diff --git a/src/main/java/de/todesbaum/jsite/application/FileOption.java b/src/main/java/de/todesbaum/jsite/application/FileOption.java index 4c38286..66efc09 100644 --- a/src/main/java/de/todesbaum/jsite/application/FileOption.java +++ b/src/main/java/de/todesbaum/jsite/application/FileOption.java @@ -86,6 +86,20 @@ public class FileOption { mimeType = defaultMimeType; } + public FileOption(FileOption other) { + this.insert = other.insert; + this.forceInsert = other.forceInsert; + this.insertRedirect = other.insertRedirect; + this.lastInsertHash = other.lastInsertHash; + this.lastInsertEdition = other.lastInsertEdition; + this.lastInsertFilename = other.lastInsertFilename; + this.currentHash = other.currentHash; + this.customKey = other.customKey; + this.changedName = other.changedName; + this.defaultMimeType = other.defaultMimeType; + this.mimeType = other.mimeType; + } + /** * Returns the custom key. The custom key is only used when * {@link #isInsert()} and {@link #isInsertRedirect()} both return {@code diff --git a/src/main/java/de/todesbaum/jsite/application/Project.java b/src/main/java/de/todesbaum/jsite/application/Project.java index 836a2cd..d9146a1 100644 --- a/src/main/java/de/todesbaum/jsite/application/Project.java +++ b/src/main/java/de/todesbaum/jsite/application/Project.java @@ -94,7 +94,9 @@ public class Project implements Comparable { lastInsertionTime = project.lastInsertionTime; alwaysForceInserts = project.alwaysForceInserts; ignoreHiddenFiles = project.ignoreHiddenFiles; - fileOptions = new HashMap(project.fileOptions); + for (Entry fileOption : fileOptions.entrySet()) { + fileOptions.put(fileOption.getKey(), new FileOption(fileOption.getValue())); + } } /**