X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fmain%2FConfiguration.java;h=d03d70a0467c3209422d08edbb3b2d47c38dba04;hb=321a7a1d782260f91d1cdbe8eece1c20909b83ef;hp=a54d529432c3ae8e14680356696ecae3adb6af7a;hpb=d261320b9f6a902859a959dabdb16f2ed347dd09;p=jSite.git diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index a54d529..d03d70a 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -332,7 +332,11 @@ public class Configuration { Project project = new Project(); projects.add(project); project.setDescription(projectNode.getNode("description").getValue("")); - project.setIndexFile(projectNode.getNode("index-file").getValue("")); + String indexFile = projectNode.getNode("index-file").getValue(""); + if (indexFile.indexOf('/') > -1) { + indexFile = ""; + } + project.setIndexFile(indexFile); project.setLastInsertionTime(Long.parseLong(projectNode.getNode("last-insertion-time").getValue("0"))); project.setLocalPath(projectNode.getNode("local-path").getValue("")); project.setName(projectNode.getNode("name").getValue("")); @@ -360,6 +364,9 @@ public class Configuration { fileOption.setInsertRedirect(Boolean.parseBoolean(fileOptionNode.getNode("insert-redirect").getValue())); } fileOption.setCustomKey(fileOptionNode.getNode("custom-key").getValue("")); + if (fileOptionNode.getNode("changed-name") != null) { + fileOption.setChangedName(fileOptionNode.getNode("changed-name").getValue()); + } fileOption.setMimeType(fileOptionNode.getNode("mime-type").getValue("")); fileOption.setContainer(fileOptionNode.getNode("container").getValue()); if (fileOptionNode.getNode("replace-edition") != null) { @@ -409,6 +416,7 @@ public class Configuration { fileOptionNode.append("insert", String.valueOf(fileOption.isInsert())); fileOptionNode.append("insert-redirect", String.valueOf(fileOption.isInsertRedirect())); fileOptionNode.append("custom-key", fileOption.getCustomKey()); + fileOptionNode.append("changed-name", fileOption.getChangedName()); fileOptionNode.append("mime-type", fileOption.getMimeType()); fileOptionNode.append("container", fileOption.getContainer()); fileOptionNode.append("replace-edition", String.valueOf(fileOption.getReplaceEdition()));