diff options
author | Alex Zolotarev <deathbaba@gmail.com> | 2011-04-03 09:53:05 +0400 |
---|---|---|
committer | Alex Zolotarev <alex@maps.me> | 2015-09-23 01:14:59 +0300 |
commit | 1561da21ef34bab48a5e145e32dd7fe7280b5edd (patch) | |
tree | a2602ce07cea4df3a586714885a97daf733dd3f2 /storage | |
parent | ef3d9ba306a172c3e045c79efb5e6ac9a9babc32 (diff) |
Fixed World activation from resources
Diffstat (limited to 'storage')
-rw-r--r-- | storage/storage.cpp | 13 |
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 |