1
0
mirror of https://github.com/yacy/yacy_search_server.git synced 2025-07-17 08:26:08 -04:00

*) Bugfix for NullpointerException in deleteOldHTCache

git-svn-id: https://svn.berlios.de/svnroot/repos/yacy/trunk@1326 6c8d7289-2bf4-0310-a012-ef5d649a1542
This commit is contained in:
theli
2006-01-13 10:37:42 +00:00
parent fd9b64290c
commit 7c22afe3de

@ -157,13 +157,15 @@ public final class plasmaHTCache {
private void deleteOldHTCache(File directory) {
String[] list = directory.list();
File object;
for (int i = list.length - 1; i >= 0 ; i--) {
object = new File(directory, list[i]);
if (object.isFile()) {
object.delete();
} else {
deleteOldHTCache(object);
if (list != null) {
File object;
for (int i = list.length - 1; i >= 0 ; i--) {
object = new File(directory, list[i]);
if (object.isFile()) {
object.delete();
} else {
deleteOldHTCache(object);
}
}
}
directory.delete();