Store and load last insert edition.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 12:09:18 +0000 (13:09 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 12:09:18 +0000 (13:09 +0100)
src/de/todesbaum/jsite/main/Configuration.java

index 1eb4b92..90cb40a 100644 (file)
@@ -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");