MCPcopy Create free account
hub / github.com/ThirteenAG/Ultimate-ASI-Loader / GetFilePathForOverload

Function GetFilePathForOverload

source/dllmain.cpp:2777–2801  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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())

Callers 11

shCustomLoadLibraryExAFunction · 0.85
shCustomLoadLibraryExWFunction · 0.85
shCustomCreateFileAFunction · 0.85
shCustomCreateFileWFunction · 0.85
shCustomCreateFile2Function · 0.85
shCustomCreateFile3Function · 0.85

Calls 4

HasVirtualPathsFunction · 0.85
NormalizePathFunction · 0.85
GetOverloadedFilePathFunction · 0.85
endMethod · 0.80

Tested by

no test coverage detected