listFiles() can return null if the File its called on is not a directory,

or if any unspecified error or hiccup occurs within the acidic innards of
the JVM. If that's the case, we probably will fail deleting the directory
itself below these lines, but it's better than throwing a NPE and
sticking a fork in everything.


git-svn-id: https://samskivert.googlecode.com/svn/trunk@1736 6335cc39-0255-0410-8fd6-9bcaacd3b74c
This commit is contained in:
ray
2005-12-02 22:56:01 +00:00
parent 8892561d6a
commit 326c1b2ce1
@@ -49,8 +49,10 @@ public class FileUtil
{
if (file.isDirectory()) {
File[] files = file.listFiles();
for (int ii = 0; ii < files.length; ii++) {
recursiveWipe(files[ii], true);
if (files != null) {
for (int ii = 0; ii < files.length; ii++) {
recursiveWipe(files[ii], true);
}
}
}
if (wipeMe) {