Only copy the current hash to the last insert hash if it has been set.
authorDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 13:07:15 +0000 (14:07 +0100)
committerDavid ‘Bombe’ Roden <bombe@freenetproject.org>
Sat, 17 Mar 2012 13:07:15 +0000 (14:07 +0100)
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());
                        }