Skip to content

Commit 46def50

Browse files
committed
Mollifying logic so that failed partial path loads degrade into a still launched picker instance
1 parent f9870c3 commit 46def50

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

  • AndroidFilePickerLightLibrary/src/main/java/com/maxieds/androidfilepickerlightlibrary

AndroidFilePickerLightLibrary/src/main/java/com/maxieds/androidfilepickerlightlibrary/DisplayTypes.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,10 +263,10 @@ public static DirectoryResultContext probeAtCursoryFolderQuery(String nextSubfol
263263
fpInst.setCustomFileFilter(DisplayFragments.getInstance().localFilesListFilter);
264264
fpInst.setCustomFolderSort(DisplayFragments.getInstance().localFilesListSortFunc);
265265
}
266-
if(!fpInst.enterNextSubfolder(nextSubfolderPath)) {
266+
// Choose to degrade nicely if possible (no throwing fatal errors if can recover):
267+
if(!fpInst.enterNextSubfolder(nextSubfolderPath) && fpInst.getCWD().equals("")) { // did not load anywhere:
267268
return null;
268269
}
269-
Log.i(LOGTAG, "ENTERING subfolder \"" + nextSubfolderPath + "\" ...");
270270
return probeAtCursoryFolderQueryGetNext();
271271
}
272272

0 commit comments

Comments
 (0)