X-Git-Url: https://git.pterodactylus.net/?a=blobdiff_plain;ds=sidebyside;f=src%2Fde%2Ftodesbaum%2Fjsite%2Fapplication%2FProject.java;h=bf891b16bf8b3bac077fdcb19c5df76d2d0f8360;hb=a4f3632796dfe5fbdcd1f6b7fd4b386b21808a09;hp=16acd49d8b9750b944d810f5ced3f4e7fa0aae4c;hpb=9a7fb4ee0b03f8af6be48c78d08e19bd89d022ff;p=jSite.git diff --git a/src/de/todesbaum/jsite/application/Project.java b/src/de/todesbaum/jsite/application/Project.java index 16acd49..bf891b1 100644 --- a/src/de/todesbaum/jsite/application/Project.java +++ b/src/de/todesbaum/jsite/application/Project.java @@ -420,13 +420,18 @@ public class Project implements Comparable { } /** - * 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. + * Performs some post-processing on the project after it was inserted + * successfully. At the moment it copies the current hashes of all file + * options to the last insert hashes, updating the hashes for the next + * insert. */ - public void copyHashes() { + public void onSuccessfulInsert() { for (FileOption fileOption : fileOptions.values()) { - fileOption.setLastInsertHash(fileOption.getCurrentHash()); + if ((fileOption.getCurrentHash() != null) && (fileOption.getCurrentHash().length() > 0) && !fileOption.getCurrentHash().equals(fileOption.getLastInsertHash())) { + fileOption.setLastInsertEdition(edition); + fileOption.setLastInsertHash(fileOption.getCurrentHash()); + } + fileOption.setForceInsert(false); } }