From 4a8decbd175ff792f715a4816258b1af94c7027d Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Sat, 17 Mar 2012 13:09:18 +0100 Subject: [PATCH] Store and load last insert edition. --- src/de/todesbaum/jsite/main/Configuration.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index 1eb4b92..90cb40a 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -342,7 +342,8 @@ public class Configuration { for (SimpleXML fileNode : lastInsertHashesNode.getNodes("file")) { String filename = fileNode.getNode("filename").getValue(); String lastInsertHash = fileNode.getNode("last-insert-hash").getValue(); - project.getFileOption(filename).setLastInsertHash(lastInsertHash); + int lastInsertEdition = Integer.valueOf(fileNode.getNode("last-insert-edition").getValue()); + project.getFileOption(filename).setLastInsertHash(lastInsertHash).setLastInsertEdition(lastInsertEdition); } } @@ -404,6 +405,7 @@ public class Configuration { SimpleXML fileNode = lastInsertHashesNode.append("file"); fileNode.append("filename", fileOption.getKey()); fileNode.append("last-insert-hash", fileOption.getValue().getLastInsertHash()); + fileNode.append("last-insert-edition", String.valueOf(fileOption.getValue().getLastInsertEdition())); } SimpleXML fileOptionsNode = projectNode.append("file-options"); -- 2.7.4