fixed problem with wrong hash length in file share

see: http://www.yacy-forum.de/viewtopic.php?p=16565#16565

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1658 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 19 years ago
parent 56516fd8e6
commit 218cd6561c

@ -733,11 +733,17 @@ public final class yacySeedDB {
subdom = host.substring(0, p);
host = host.substring(p + 1);
}
// check if we have a b64-hash or a hex-hash
String hash = host.substring(0, host.length() - 6);
if (hash.length() > commonHashLength) {
// this is probably a hex-hash
hash = yacySeed.hexHash2b64Hash(hash);
}
// check remote seeds
seed = getConnected(host.substring(0, host.length() - 6)); // checks only remote, not local
seed = getConnected(hash); // checks only remote, not local
// check local seed
if (seed == null) {
if (host.substring(0, host.length() - 6).equals(mySeed.hash))
if (hash.equals(mySeed.hash))
seed = mySeed;
else return null;
}

Loading…
Cancel
Save