From 79a3959a9fe7c03f140aceb5fdb8f38d38ed4cbc Mon Sep 17 00:00:00 2001 From: Victor Shcherb Date: Mon, 3 Aug 2015 01:43:21 +0200 Subject: [PATCH] Fix some issues --- OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java | 2 +- OsmAnd/src/net/osmand/plus/resources/ResourceManager.java | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java index 6d9d7a56b8..270c06a12f 100644 --- a/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java +++ b/OsmAnd/src/net/osmand/plus/download/LocalIndexesFragment.java @@ -344,7 +344,7 @@ public class LocalIndexesFragment extends OsmandExpandableListFragment { File parent = new File(i.getPathToData()).getParentFile(); if(i.getType() == LocalIndexType.SRTM_DATA){ parent = getMyApplication().getAppPath(IndexConstants.SRTM_INDEX_DIR); - } else if(i.getFileName().endsWith(IndexConstants.ROADS_INDEX_DIR)){ + } else if(i.getFileName().endsWith(IndexConstants.BINARY_ROAD_MAP_INDEX_EXT)){ parent = getMyApplication().getAppPath(IndexConstants.ROADS_INDEX_DIR); } else if(i.getType() == LocalIndexType.WIKI_DATA){ parent = getMyApplication().getAppPath(IndexConstants.WIKI_INDEX_DIR); diff --git a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java index e22dbb0347..fa044782f4 100644 --- a/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java +++ b/OsmAnd/src/net/osmand/plus/resources/ResourceManager.java @@ -594,6 +594,8 @@ public class ResourceManager { if (f.getName().endsWith("-roads" + IndexConstants.BINARY_MAP_INDEX_EXT)) { f.renameTo(new File(roadsPath, f.getName().replace("-roads" + IndexConstants.BINARY_MAP_INDEX_EXT, IndexConstants.BINARY_ROAD_MAP_INDEX_EXT))); + } else if (f.getName().endsWith(IndexConstants.BINARY_ROAD_MAP_INDEX_EXT)) { + f.renameTo(new File(roadsPath, f.getName())); } } }