mirror of https://github.com/apache/lucene.git
check null or exists before deleting file
git-svn-id: https://svn.apache.org/repos/asf/lucene/dev/trunk@1593884 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
b9e38c0a10
commit
8da5f6301c
|
@ -1013,6 +1013,7 @@ public abstract class SolrTestCaseJ4 extends LuceneTestCase {
|
|||
}
|
||||
|
||||
public static boolean recurseDelete(File f) {
|
||||
if(f == null || !f.exists()) return false;
|
||||
if (f.isDirectory()) {
|
||||
for (File sub : f.listFiles()) {
|
||||
if (!recurseDelete(sub)) {
|
||||
|
|
Loading…
Reference in New Issue