This commit is contained in:
Victor Shcherb 2017-09-21 00:19:33 +02:00
parent 6b328c2698
commit 41d7333300

View file

@ -288,8 +288,8 @@ public class AppInitializer implements IProgress {
}
private void indexRegionsBoundaries(List<String> warnings) {
try {
File file = app.getAppPath("regions.ocbf");
try {
if (file != null) {
if (!file.exists()) {
Algorithms.streamCopy(OsmandRegions.class.getResourceAsStream("regions.ocbf"),
@ -300,6 +300,7 @@ public class AppInitializer implements IProgress {
}
} catch (Exception e) {
warnings.add(e.getMessage());
file.delete(); // recreate file
LOG.error(e.getMessage(), e);
}
}