Update regions ocbf to latest version

This commit is contained in:
Victor Shcherb 2018-06-16 12:34:32 +02:00
parent a6b96b49eb
commit 35b2ce93fe

View file

@ -97,12 +97,13 @@ public class OsmandRegions {
public BinaryMapIndexReader prepareFile() throws IOException { public BinaryMapIndexReader prepareFile() throws IOException {
File regions = new File("regions.ocbf"); File regions = new File("regions.ocbf");
if (!regions.exists()) { // internal version could be updated
// if (!regions.exists()) {
InputStream is = OsmandRegions.class.getResourceAsStream("regions.ocbf"); InputStream is = OsmandRegions.class.getResourceAsStream("regions.ocbf");
FileOutputStream fous = new FileOutputStream(regions); FileOutputStream fous = new FileOutputStream(regions);
Algorithms.streamCopy(is, fous); Algorithms.streamCopy(is, fous);
fous.close(); fous.close();
} // }
return prepareFile(regions.getAbsolutePath()); return prepareFile(regions.getAbsolutePath());
} }