From: David ‘Bombe’ Roden Date: Thu, 20 Sep 2012 15:21:27 +0000 (+0200) Subject: Reset last-insert hash of all files when a project’s keys are changed. X-Git-Tag: 0.11^2~9 X-Git-Url: https://git.pterodactylus.net/?a=commitdiff_plain;h=389a1331d623ad71ffcccbfbd9a5da043b48f70f;p=jSite.git Reset last-insert hash of all files when a project’s keys are changed. This resolves #284. --- diff --git a/src/main/java/de/todesbaum/jsite/gui/ProjectPage.java b/src/main/java/de/todesbaum/jsite/gui/ProjectPage.java index 2fc5716..ad3f2e5 100644 --- a/src/main/java/de/todesbaum/jsite/gui/ProjectPage.java +++ b/src/main/java/de/todesbaum/jsite/gui/ProjectPage.java @@ -33,6 +33,7 @@ import java.awt.event.ActionEvent; import java.awt.event.KeyEvent; import java.io.IOException; import java.text.MessageFormat; +import java.util.Map.Entry; import javax.swing.AbstractAction; import javax.swing.Action; @@ -58,6 +59,7 @@ import javax.swing.text.Document; import javax.swing.text.DocumentFilter; import net.pterodactylus.util.swing.SortedListModel; +import de.todesbaum.jsite.application.FileOption; import de.todesbaum.jsite.application.Freenet7Interface; import de.todesbaum.jsite.application.Project; import de.todesbaum.jsite.application.WebOfTrustInterface; @@ -638,6 +640,9 @@ public class ProjectPage extends TWizardPage implements ListSelectionListener, D selectedProject.setRequestURI(keyDialog.getPublicKey()); if (!originalPublicKey.equals(selectedProject.getRequestURI()) || !originalPrivateKey.equals(selectedProject.getInsertURI())) { selectedProject.setEdition(-1); + for (Entry fileOption : selectedProject.getFileOptions().entrySet()) { + fileOption.getValue().setLastInsertHash(null); + } } updateCompleteURI(); }