Skip to content

Distributed Peer-to-Peer Web Search Engine and Intranet Search Appliance

added a deleteOnExit for blob file deletion in case that a deletion is not successful.

orbiter44874cb550dd
diff --git a/source/de/anomic/kelondro/blob/BLOBArray.java b/source/de/anomic/kelondro/blob/BLOBArray.java
index f57fa3689..c13ada8a3 100755
--- a/source/de/anomic/kelondro/blob/BLOBArray.java
+++ b/source/de/anomic/kelondro/blob/BLOBArray.java
@@ -208,7 +208,7 @@ public class BLOBArray implements BLOB {
// too old
blobItem oldestBLOB = blobs.remove(0);
oldestBLOB.blob.close();
- oldestBLOB.location.delete();
+ if (!oldestBLOB.location.delete()) oldestBLOB.location.deleteOnExit();
}
// size limit
@@ -216,7 +216,7 @@ public class BLOBArray implements BLOB {
// too large
blobItem oldestBLOB = blobs.remove(0);
oldestBLOB.blob.close();
- oldestBLOB.location.delete();
+ if (!oldestBLOB.location.delete()) oldestBLOB.location.deleteOnExit();
}
}