diff options
Diffstat (limited to 'src/com/vaadin')
-rw-r--r-- | src/com/vaadin/data/util/FilesystemContainer.java | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/com/vaadin/data/util/FilesystemContainer.java b/src/com/vaadin/data/util/FilesystemContainer.java index a26323f487..76a7b90376 100644 --- a/src/com/vaadin/data/util/FilesystemContainer.java +++ b/src/com/vaadin/data/util/FilesystemContainer.java @@ -395,6 +395,11 @@ public class FilesystemContainer implements Container.Hierarchical { } else { l = f.listFiles(); } + if (l == null) { + // File.listFiles returns null if File does not exist or if there + // was an IO error (permission denied) + return; + } final List<File> ll = Arrays.asList(l); Collections.sort(ll); |