Skip to content

Commit

Permalink
correction
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Oct 25, 2023
1 parent 344f870 commit 855788d
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions source/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -599,9 +599,8 @@ void LoadPluginsAndRestoreIAT(uintptr_t retaddr)

for (size_t i = 0; i < Kernel32ExportsNamesCount; i++)
{
// GetFileAttributes functions are not kept because of degraded loading times in some games
// Plugins can still use them via exports
if (!sFileLoaderPath.empty() && (i == eCreateFileA || i == eCreateFileW))
if (!sFileLoaderPath.empty() && (i == eCreateFileA || i == eCreateFileW
|| i == eGetFileAttributesA || i == eGetFileAttributesW || i == eGetFileAttributesExA || i == eGetFileAttributesExW))
continue;

if (Kernel32Data[i][IATPtr] && Kernel32Data[i][ProcAddress])
Expand Down Expand Up @@ -755,7 +754,7 @@ std::filesystem::path GetFileName(auto lpFilename)

auto filePath = std::filesystem::path(lpFilename);
auto absolutePath = std::filesystem::absolute(filePath, ec);
auto relativePath = std::filesystem::weakly_canonical(absolutePath, ec).lexically_relative(gamePath);
auto relativePath = std::filesystem::canonical(absolutePath, ec).lexically_relative(gamePath);
auto commonPath = gamePath;

if (starts_with(relativePath, ".."))
Expand Down

0 comments on commit 855788d

Please sign in to comment.