mrpdaemon / encfs-java

encfs-java is a Java library for accessing data in EncFS volumes
GNU Lesser General Public License v3.0
42 stars 15 forks source link

EncFSLocalFileProvider.listFiles() needs to handle input location not being a directory #51

Closed mrpdaemon closed 11 years ago

mrpdaemon commented 11 years ago

public List listFiles(String dirPath) { File srcDir = new File(rootPath.getAbsoluteFile(), dirPath); File[] files = srcDir.listFiles(); List results = new ArrayList(files.length);

If dirPath doesn't refer to a directory then srcDir.listFiles() will return null, so the files.length access will cause a NullPointerException.

mrpdaemon commented 11 years ago

Fixed at 09c7dcebc4b878075721d0b72c2c1c5068ccc69a