Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
mrpdaemon opened this issue Dec 27, 2012 · 1 comment
Labels

Comments

@mrpdaemon
Copy link
Owner

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
Copy link
Owner Author

Fixed at 09c7dce

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant