Fix TravelDbHelper#initTravelBooks
This commit is contained in:
parent
38f9235721
commit
85b9c1e629
1 changed files with 3 additions and 1 deletions
|
@ -95,7 +95,7 @@ public class TravelDbHelper {
|
|||
File[] possibleFiles = application.getAppPath(IndexConstants.WIKIVOYAGE_INDEX_DIR).listFiles();
|
||||
String travelBook = application.getSettings().SELECTED_TRAVEL_BOOK.get();
|
||||
existingTravelBooks.clear();
|
||||
if (possibleFiles != null) {
|
||||
if (possibleFiles != null && possibleFiles.length > 0) {
|
||||
for (File f : possibleFiles) {
|
||||
if (f.getName().endsWith(IndexConstants.BINARY_WIKIVOYAGE_MAP_INDEX_EXT)) {
|
||||
existingTravelBooks.add(f);
|
||||
|
@ -106,6 +106,8 @@ public class TravelDbHelper {
|
|||
}
|
||||
}
|
||||
}
|
||||
} else {
|
||||
selectedTravelBook = null;
|
||||
}
|
||||
localDataHelper.refreshCachedData();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue