| 466 | }; |
| 467 | |
| 468 | static void CollectPboEntry(const FileInfoO& fi, const FileBankType*, void* ctx) |
| 469 | { |
| 470 | auto* c = static_cast<PboCollectorCtx*>(ctx); |
| 471 | std::string name = (const char*)fi.name; |
| 472 | auto dot = name.find_last_of('.'); |
| 473 | std::string ext; |
| 474 | if (dot != std::string::npos) |
| 475 | { |
| 476 | ext = name.substr(dot); |
| 477 | for (auto& ch : ext) |
| 478 | ch = static_cast<char>(tolower(static_cast<unsigned char>(ch))); |
| 479 | } |
| 480 | if (ext == ".pbo") |
| 481 | return; |
| 482 | |
| 483 | ScanItem item; |
| 484 | item.path = c->pboPath + "#" + name; |
| 485 | item.pboPath = c->pboPath; |
| 486 | item.entryName = name; |
| 487 | item.extension = ext; |
| 488 | item.size = fi.length; |
| 489 | item.category = CategorizeByExtension(ext); |
| 490 | c->items->push_back(std::move(item)); |
| 491 | } |
| 492 | |
| 493 | static std::string JsonEscape(const std::string& s) |
| 494 | { |
nothing calls this directly
no test coverage detected