| 95 | } |
| 96 | |
| 97 | void cResourceMan::validatePaths() { |
| 98 | |
| 99 | mValidPaths.clear(); |
| 100 | for (auto path : mAllPaths) { |
| 101 | |
| 102 | if (path[path.size() - 1] != '/') |
| 103 | path.append("/"); |
| 104 | |
| 105 | if (FileExists(path + "Data")) { |
| 106 | |
| 107 | // Ensure we have a trailing / |
| 108 | if (path[path.size() - 1] != '/') |
| 109 | path.append("/"); |
| 110 | |
| 111 | mValidPaths.push_back(path); |
| 112 | } |
| 113 | } |
| 114 | } |
| 115 | |
| 116 | void cResourceMan::findCampaigns() { |
| 117 | mCampaigns.clear(); |