From 3cfa7d22f64e8792d35c6640e2d4da0f4f6fe1ae Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Thu, 22 Mar 2012 21:12:06 +0100 Subject: [PATCH] Store and load last insert filename. --- src/de/todesbaum/jsite/main/Configuration.java | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/src/de/todesbaum/jsite/main/Configuration.java b/src/de/todesbaum/jsite/main/Configuration.java index e175b9d..f5001b0 100644 --- a/src/de/todesbaum/jsite/main/Configuration.java +++ b/src/de/todesbaum/jsite/main/Configuration.java @@ -346,8 +346,12 @@ public class Configuration { String filename = fileNode.getNode("filename").getValue(); String lastInsertHash = fileNode.getNode("last-insert-hash").getValue(); int lastInsertEdition = Integer.valueOf(fileNode.getNode("last-insert-edition").getValue()); + String lastInsertFilename = filename; + if (fileNode.getNode("last-insert-filename") != null) { + lastInsertFilename = fileNode.getNode("last-insert-filename").getValue(); + } FileOption fileOption = project.getFileOption(filename); - fileOption.setLastInsertHash(lastInsertHash).setLastInsertEdition(lastInsertEdition); + fileOption.setLastInsertHash(lastInsertHash).setLastInsertEdition(lastInsertEdition).setLastInsertFilename(lastInsertFilename); fileOptions.put(filename, fileOption); } } @@ -410,6 +414,7 @@ public class Configuration { fileNode.append("filename", fileOption.getKey()); fileNode.append("last-insert-hash", fileOption.getValue().getLastInsertHash()); fileNode.append("last-insert-edition", String.valueOf(fileOption.getValue().getLastInsertEdition())); + fileNode.append("last-insert-filename", fileOption.getValue().getLastInsertFilename()); } SimpleXML fileOptionsNode = projectNode.append("file-options"); -- 2.7.4