X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fapplication%2FProject.java;h=16acd49d8b9750b944d810f5ced3f4e7fa0aae4c;hb=9a7fb4ee0b03f8af6be48c78d08e19bd89d022ff;hp=1f5e372c902671ea77655126f052e58aa2700386;hpb=cb9df9259586b1eb8c364cc2db289a84779ea36a;p=jSite.git diff --git a/src/de/todesbaum/jsite/application/Project.java b/src/de/todesbaum/jsite/application/Project.java index 1f5e372..16acd49 100644 --- a/src/de/todesbaum/jsite/application/Project.java +++ b/src/de/todesbaum/jsite/application/Project.java @@ -419,4 +419,15 @@ public class Project implements Comparable { return "USK@" + requestURI + "/" + path + "/" + (edition + offset) + "/"; } + /** + * Copies the current hashes of all file options to the last insert hashes, + * updating the hashes for the next insert. This method should only be + * called after the insert has finished successfully. + */ + public void copyHashes() { + for (FileOption fileOption : fileOptions.values()) { + fileOption.setLastInsertHash(fileOption.getCurrentHash()); + } + } + }