| 208 | } |
| 209 | |
| 210 | ArchiveFilePtr Doom3FileSystem::openFile(const std::string& filename) |
| 211 | { |
| 212 | if (filename.find("\\") != std::string::npos) |
| 213 | { |
| 214 | rError() << "Filename contains backslash: " << filename << std::endl; |
| 215 | return ArchiveFilePtr(); |
| 216 | } |
| 217 | |
| 218 | for (const auto& descriptor : _archives) |
| 219 | { |
| 220 | auto file = descriptor.archive->openFile(filename); |
| 221 | |
| 222 | if (file) |
| 223 | { |
| 224 | return file; |
| 225 | } |
| 226 | } |
| 227 | |
| 228 | // not found |
| 229 | return ArchiveFilePtr(); |
| 230 | } |
| 231 | |
| 232 | ArchiveFilePtr Doom3FileSystem::openFileInAbsolutePath(const std::string& filename) |
| 233 | { |