From: David ‘Bombe’ Roden Date: Fri, 1 Jan 2010 19:57:13 +0000 (+0100) Subject: Save and restore “ignore-hidden-files” property in configuration. X-Git-Tag: 0.9~41 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=b65274cafa2434a4ab471e34d0bc5452b561c71c;p=jSite.git Save and restore “ignore-hidden-files” property in configuration. --- diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index 9d288b5..3bbce38 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -343,6 +343,11 @@ public class Configuration { project.setEdition(Integer.parseInt(projectNode.getNode("edition").getValue("0"))); project.setInsertURI(projectNode.getNode("insert-uri").getValue("")); project.setRequestURI(projectNode.getNode("request-uri").getValue("")); + if (projectNode.getNode("ignore-hidden-files") != null) { + project.setIgnoreHiddenFiles(Boolean.parseBoolean(projectNode.getNode("ignore-hidden-files").getValue("true"))); + } else { + project.setIgnoreHiddenFiles(true); + } SimpleXML fileOptionsNode = projectNode.getNode("file-options"); Map fileOptions = new HashMap(); if (fileOptionsNode != null) { @@ -389,6 +394,7 @@ public class Configuration { projectNode.append("path", project.getPath()); projectNode.append("insert-uri", project.getInsertURI()); projectNode.append("request-uri", project.getRequestURI()); + projectNode.append("ignore-hidden-files", String.valueOf(project.isIgnoreHiddenFiles())); SimpleXML fileOptionsNode = projectNode.append("file-options"); Iterator> entries = project.getFileOptions().entrySet().iterator(); while (entries.hasNext()) {