Fix NPE in FileSystemProvider.

In case we can't get the contents of a directory.

Bug: 148836274
Test: No NPE
Change-Id: If896423f7788b614780cd7a07ffc75e25efc6ec5
This commit is contained in:
Martijn Coenen
2020-03-11 14:10:26 +01:00
parent a8c6c8b1f6
commit 8b68b8ca2b

View File

@@ -430,7 +430,7 @@ public abstract class FileSystemProvider extends DocumentsProvider {
if (shouldHide(file)) continue;
if (file.isDirectory()) {
for (File child : file.listFiles()) {
for (File child : FileUtils.listFilesOrEmpty(file)) {
pending.add(child);
}
}