Only copy the current hash to the last insert hash if it has been set.
[jSite.git] / src / de / todesbaum / jsite / application / Project.java
index 16acd49..c7bdd79 100644 (file)
@@ -426,7 +426,10 @@ public class Project implements Comparable<Project> {
         */
        public void copyHashes() {
                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());
+                       }
                }
        }