| 2775 | } |
| 2776 | |
| 2777 | std::filesystem::path GetFilePathForOverload(auto path) |
| 2778 | { |
| 2779 | try |
| 2780 | { |
| 2781 | if (HasVirtualPaths()) |
| 2782 | { |
| 2783 | std::shared_lock lock(virtualPathMutex); |
| 2784 | auto normalized = NormalizePath(path); |
| 2785 | auto it = virtualPathMappings.find(normalized); |
| 2786 | if (it != virtualPathMappings.end()) |
| 2787 | { |
| 2788 | std::filesystem::path vpath(it->second.first); |
| 2789 | auto recursive = GetOverloadedFilePath(vpath); |
| 2790 | if (!recursive.empty()) |
| 2791 | return recursive; |
| 2792 | return vpath; |
| 2793 | } |
| 2794 | } |
| 2795 | |
| 2796 | if (!sActiveDirectories.empty()) |
| 2797 | return GetOverloadedFilePath(path); |
| 2798 | } catch (...) {} |
| 2799 | |
| 2800 | return {}; |
| 2801 | } |
| 2802 | |
| 2803 | #define value_orA(path1, path2) (path1.empty() ? path2 : path1.string().c_str()) |
| 2804 | #define value_orW(path1, path2) (path1.empty() ? path2 : path1.wstring().c_str()) |
no test coverage detected