Fix buggy path

This commit is contained in:
Victor Shcherb 2014-10-03 17:45:08 +02:00
parent bdc984c640
commit aa2cf3a807

View file

@ -76,13 +76,13 @@ public class CoreResourcesFromAndroidAssetsCustom extends ICoreResourcesProvider
} }
// Get location of this resource // Get location of this resource
final File res = ((OsmandApplication) _context.getApplicationContext()).getAppPath("OsmAndCore_ResourcesBundle/" + resourceInBundle + ".qz"); final String path = "OsmAndCore_ResourcesBundle/" + resourceInBundle + ".qz";
final File res = ((OsmandApplication) _context.getApplicationContext()).getAppPath(path);
final ResourceData resourceData = new ResourceData(); final ResourceData resourceData = new ResourceData();
if (!res.exists()) { if (!res.exists()) {
try { try {
final AssetFileDescriptor resourceFd = assetManager.openFd("OsmAndCore_ResourcesBundle/" final AssetFileDescriptor resourceFd = assetManager.openFd(path);
+ resourceInBundle);
long declaredSize = resourceFd.getDeclaredLength(); long declaredSize = resourceFd.getDeclaredLength();
resourceData.size = resourceFd.getLength(); resourceData.size = resourceFd.getLength();
resourceData.offset = resourceFd.getStartOffset(); resourceData.offset = resourceFd.getStartOffset();