Skip to content
This repository has been archived by the owner on Feb 11, 2022. It is now read-only.

Commit

Permalink
Handle case if directory does not exist in FilePicker
Browse files Browse the repository at this point in the history
Fixes #4
  • Loading branch information
spacecowboy committed Apr 2, 2014
1 parent 5a0aed1 commit a17d655
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
4 changes: 2 additions & 2 deletions gradle.properties
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@

# Project-wide Gradle settings.

VERSION_NAME=1.1.2-SNAPSHOT
VERSION_CODE=4
VERSION_NAME=1.1.3-SNAPSHOT
VERSION_CODE=5
GROUP=com.nononsenseapps

POM_DESCRIPTION=An extendable Android file/directory-picker you can include in your app
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -155,6 +155,11 @@ public List<File> loadInBackground() {
protected void onStartLoading() {
super.onStartLoading();

// handle if directory does not exist. Fall back to root.
if (currentPath == null || !currentPath.isDirectory()) {
currentPath = getRoot();
}

// Start watching for changes
fileObserver = new FileObserver(currentPath.getPath(),
FileObserver.CREATE |
Expand Down

0 comments on commit a17d655

Please sign in to comment.