| 88 | } |
| 89 | |
| 90 | std::string ExportDataManager::getDataPath(const std::string& _name) const |
| 91 | { |
| 92 | VectorString result; |
| 93 | common::VectorWString wresult; |
| 94 | |
| 95 | for (const auto& path : mPaths) |
| 96 | { |
| 97 | common::scanFolder(wresult, path.name, path.recursive, MyGUI::UString(_name).asWStr(), true); |
| 98 | } |
| 99 | |
| 100 | for (const auto& file : wresult) |
| 101 | { |
| 102 | result.push_back(MyGUI::UString(file).asUTF8()); |
| 103 | } |
| 104 | |
| 105 | if (!result.empty()) |
| 106 | { |
| 107 | const std::string& path = result[0]; |
| 108 | if (result.size() > 1) |
| 109 | { |
| 110 | MYGUI_PLATFORM_LOG(Warning, "There are several files with name '" << _name << "'. '" << path << "' was used."); |
| 111 | MYGUI_PLATFORM_LOG(Warning, "Other candidates are:"); |
| 112 | for (size_t index = 1; index < result.size(); index ++) |
| 113 | MYGUI_PLATFORM_LOG(Warning, " - '" << result[index] << "'"); |
| 114 | } |
| 115 | return path; |
| 116 | } |
| 117 | |
| 118 | return {}; |
| 119 | } |
| 120 | |
| 121 | void ExportDataManager::addResourceLocation(const std::string& _path, bool _recursive) |
| 122 | { |
no test coverage detected