From e7502283efff950f985139db4031391d5e22af5f Mon Sep 17 00:00:00 2001 From: =?utf8?q?David=20=E2=80=98Bombe=E2=80=99=20Roden?= Date: Mon, 24 Jan 2011 20:19:30 +0100 Subject: [PATCH] =?utf8?q?Download=20the=20edition=20if=20it=E2=80=99s=20n?= =?utf8?q?ewer=20than=20the=20current=20known=20latest=20edition.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit --- src/main/java/net/pterodactylus/sone/core/FreenetInterface.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java index 52c2857..3ccda5b 100644 --- a/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java +++ b/src/main/java/net/pterodactylus/sone/core/FreenetInterface.java @@ -153,8 +153,8 @@ public class FreenetInterface { @SuppressWarnings("synthetic-access") public void onFoundEdition(long edition, USK key, ObjectContainer objectContainer, ClientContext clientContext, boolean metadata, short codec, byte[] data, boolean newKnownGood, boolean newSlotToo) { logger.log(Level.FINE, "Found USK update for Sone “%s” at %s, new known good: %s, new slot too: %s.", new Object[] { sone, key, newKnownGood, newSlotToo }); - if (newKnownGood) { - sone.setLatestEdition(key.suggestedEdition); + if (edition > sone.getLatestEdition()) { + sone.setLatestEdition(edition); new Thread(new Runnable() { @Override -- 2.7.4