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:
@ -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();
|
||||
|
Reference in New Issue
Block a user