Strip .pbo extension (QFBank::open appends it)
| 468 | |
| 469 | // Strip .pbo extension (QFBank::open appends it) |
| 470 | static std::string StripPboExt(const std::string& path) { |
| 471 | if (path.size() >= 4) { |
| 472 | auto ext = path.substr(path.size() - 4); |
| 473 | for (auto& c : ext) c = static_cast<char>(tolower(c)); |
| 474 | if (ext == ".pbo") return path.substr(0, path.size() - 4); |
| 475 | } |
| 476 | return path; |
| 477 | } |
| 478 | |
| 479 | PF_API PF_HANDLE pf_pbo_open(const char* path) { |
| 480 | ClearError(); |