diff --git a/gradle.properties b/gradle.properties index 19119b1..2a20235 100644 --- a/gradle.properties +++ b/gradle.properties @@ -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 diff --git a/library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java b/library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java index 8a5965e..c8c9e70 100644 --- a/library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java +++ b/library/src/main/java/com/nononsenseapps/filepicker/FilePickerFragment.java @@ -155,6 +155,11 @@ public class FilePickerFragment extends AbstractFilePickerFragment { 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 |