Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mapsme/omim.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlex Zolotarev <deathbaba@gmail.com>2011-04-03 09:53:05 +0400
committerAlex Zolotarev <alex@maps.me>2015-09-23 01:14:59 +0300
commit1561da21ef34bab48a5e145e32dd7fe7280b5edd (patch)
treea2602ce07cea4df3a586714885a97daf733dd3f2 /storage
parentef3d9ba306a172c3e045c79efb5e6ac9a9babc32 (diff)
Fixed World activation from resources
Diffstat (limited to 'storage')
-rw-r--r--storage/storage.cpp13
1 files changed, 13 insertions, 0 deletions
diff --git a/storage/storage.cpp b/storage/storage.cpp
index 6e77d5ae3c..8e83079acb 100644
--- a/storage/storage.cpp
+++ b/storage/storage.cpp
@@ -71,6 +71,19 @@ namespace storage
LOG(LWARNING, (e.what(), "while adding file", *it, "so this file is deleted"));
}
}
+ // separate code to activate world data file from resources
+ // if it's not found in writable data dir
+ Platform::FilesList::iterator found = std::find(filesList.begin(), filesList.end(),
+ string(WORLD_FILE_NAME DATA_FILE_EXTENSION));
+ if (found == filesList.end())
+ {
+ try {
+ m_addMap(p.ReadPathForFile(WORLD_FILE_NAME DATA_FILE_EXTENSION));
+ } catch (std::exception const & e)
+ {
+ LOG(LWARNING, (e.what(), "while adding world data file"));
+ }
+ }
}
string Storage::UpdateBaseUrl() const