From e813a9b8c976b7c24af33df253ce40ee1ec4c1d5 Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 17 Mar 2012 14:06:32 +0100 Subject: [PATCH] Fix loading of projects. --- src/de/todesbaum/jsite/main/Configuration.java | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index 90cb40a..53bfb4d 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -337,18 +337,20 @@ public class Configuration { } /* load last insert hashes. */ + Map fileOptions = new HashMap(); SimpleXML lastInsertHashesNode = projectNode.getNode("last-insert-hashes"); if (lastInsertHashesNode != null) { for (SimpleXML fileNode : lastInsertHashesNode.getNodes("file")) { String filename = fileNode.getNode("filename").getValue(); String lastInsertHash = fileNode.getNode("last-insert-hash").getValue(); int lastInsertEdition = Integer.valueOf(fileNode.getNode("last-insert-edition").getValue()); - project.getFileOption(filename).setLastInsertHash(lastInsertHash).setLastInsertEdition(lastInsertEdition); + FileOption fileOption = project.getFileOption(filename); + fileOption.setLastInsertHash(lastInsertHash).setLastInsertEdition(lastInsertEdition); + fileOptions.put(filename, fileOption); } } SimpleXML fileOptionsNode = projectNode.getNode("file-options"); - Map fileOptions = new HashMap(); if (fileOptionsNode != null) { SimpleXML[] fileOptionNodes = fileOptionsNode.getNodes("file-option"); for (SimpleXML fileOptionNode : fileOptionNodes) { -- 2.7.4