| 350 | } |
| 351 | |
| 352 | static std::string resolveVfsDisplayPath(const std::string& enginePath) |
| 353 | { |
| 354 | if (enginePath.empty() || !GUseFileBanks) |
| 355 | return {}; |
| 356 | std::string epath = enginePath; |
| 357 | std::replace(epath.begin(), epath.end(), '/', '\\'); |
| 358 | if (!epath.empty() && epath[0] == '\\') |
| 359 | epath = epath.substr(1); |
| 360 | |
| 361 | QFBank* bank = QIFStreamB::AutoBank(epath.c_str()); |
| 362 | if (!bank) |
| 363 | return {}; |
| 364 | RString prefix = bank->GetPrefix(); |
| 365 | const char* remainder = epath.c_str() + prefix.GetLength(); |
| 366 | if (!bank->FileExists(remainder)) |
| 367 | return {}; |
| 368 | RString openName = bank->GetOpenName(); |
| 369 | std::filesystem::path pboFsPath((const char*)openName); |
| 370 | std::string pboFilename = pboFsPath.filename().string(); |
| 371 | std::string parentDir = pboFsPath.parent_path().filename().string(); |
| 372 | std::string display = parentDir + "/" + pboFilename + "/" + std::string(remainder); |
| 373 | std::replace(display.begin(), display.end(), '\\', '/'); |
| 374 | return display; |
| 375 | } |
| 376 | |
| 377 | int StudioApp::findRefInFiltered(const std::string& refName) const |
| 378 | { |
no test coverage detected