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 b0ceb7f..c7bdd79 100644 (file)
@@ -426,7 +426,7 @@ public class Project implements Comparable<Project> {
         */
        public void copyHashes() {
                for (FileOption fileOption : fileOptions.values()) {
-                       if (!fileOption.getCurrentHash().equals(fileOption.getLastInsertHash())) {
+                       if ((fileOption.getCurrentHash() != null) && (fileOption.getCurrentHash().length() > 0) && !fileOption.getCurrentHash().equals(fileOption.getLastInsertHash())) {
                                fileOption.setLastInsertEdition(edition);
                                fileOption.setLastInsertHash(fileOption.getCurrentHash());
                        }