mirror of https://github.com/apache/jclouds.git
Handle null return value from File.listFiles
This matches the behavior of other call sites. Fixes andrewgaul/s3proxy#39.
This commit is contained in:
parent
9fc2ca98a0
commit
10690f9293
|
@ -673,6 +673,9 @@ public class FilesystemStorageStrategyImpl implements LocalStorageStrategy {
|
|||
private static void populateBlobKeysInContainer(File directory, Set<String> blobNames,
|
||||
Function<String, String> function) {
|
||||
File[] children = directory.listFiles();
|
||||
if (children == null) {
|
||||
return;
|
||||
}
|
||||
for (File child : children) {
|
||||
if (child.isFile()) {
|
||||
blobNames.add( function.apply(child.getAbsolutePath()) );
|
||||
|
|
Loading…
Reference in New Issue