* account for weird data
This commit is contained in:
parent
ee6330a10c
commit
f73a07a06b
|
@ -79,9 +79,8 @@ class FileTreeTransferablePolicy extends BackgroundFileTransferablePolicy<Abstra
|
|||
if (Thread.interrupted())
|
||||
throw new InterruptedException();
|
||||
|
||||
if (file.isDirectory()) {
|
||||
File[] files = file.listFiles();
|
||||
|
||||
File[] files = file.listFiles();
|
||||
if (files != null && file.isDirectory()) {
|
||||
FolderNode node = new FolderNode(FileUtilities.getFolderName(file), files.length);
|
||||
|
||||
// add folders first
|
||||
|
|
|
@ -46,12 +46,13 @@ public class FastFile extends File {
|
|||
@Override
|
||||
public File[] listFiles() {
|
||||
String[] names = list();
|
||||
File[] files = new File[names.length];
|
||||
if (names == null)
|
||||
return null;
|
||||
|
||||
File[] files = new File[names.length];
|
||||
for (int i = 0; i < names.length; i++) {
|
||||
files[i] = new FastFile(this, names[i]);
|
||||
}
|
||||
|
||||
return files;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue