tried to fix seed2.old.db-problem

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@4584 6c8d7289-2bf4-0310-a012-ef5d649a1542
pull/1/head
orbiter 17 years ago
parent 5fde618337
commit 19286fa2d1

@ -114,15 +114,12 @@ public class kelondroDyn {
buffer = new kelondroObjectBuffer(file.toString());
}
public static final void delete(File file, boolean usetree) {
if (usetree) {
public static final void delete(File file) {
if (file.isFile()) {
file.delete();
if (file.exists()) file.deleteOnExit();
} else {
if (file.isDirectory()) {
kelondroFlexWidthArray.delete(file.getParentFile(), file.getName());
} else {
file.delete();
}
kelondroFlexWidthArray.delete(file.getParentFile(), file.getName());
}
}
@ -199,7 +196,7 @@ public class kelondroDyn {
kelondroRow.Entry nt;
while (ri.hasNext()) {
nt = (kelondroRow.Entry) ri.next();
if (nt == null) throw new kelondroException("no more elements available");
if (nt == null) return null;
g = nt.getColBytes(0);
if (g == null) return null;
k = new String(g, 0, keylen);

@ -224,7 +224,7 @@ public final class yacySeedDB {
return new kelondroMapObjects(new kelondroDyn(seedDBFile, true, true, commonHashLength, 480, '#', kelondroBase64Order.enhancedCoder, usetree, false, true), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this);
} catch (Exception e) {
// try again
kelondroDyn.delete(seedDBFile, usetree);
kelondroDyn.delete(seedDBFile);
return new kelondroMapObjects(new kelondroDyn(seedDBFile, true, true, commonHashLength, 480, '#', kelondroBase64Order.enhancedCoder, usetree, false, true), 500, sortFields, longaccFields, doubleaccFields, initializeHandlerMethod, this);
}
}

Loading…
Cancel
Save