Skip to content

Commit

Permalink
restore file check and check for symlinks
Browse files Browse the repository at this point in the history
  • Loading branch information
ThirteenAG committed Jan 20, 2024
1 parent f234a76 commit bb8b242
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion source/dllmain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -787,7 +787,7 @@ std::filesystem::path WINAPI GetOverloadedFilePath(std::filesystem::path lpFilen
if (starts_with(std::filesystem::path(absolutePath).remove_filename(), gamePath) || starts_with(std::filesystem::path(absolutePath).remove_filename(), commonPath))
{
auto newPath = gamePath / sFileLoaderPath.make_preferred() / relativePath;
if (std::filesystem::exists(newPath, ec))
if (std::filesystem::exists(newPath, ec) && (std::filesystem::is_regular_file(newPath, ec) || std::filesystem::is_symlink(newPath, ec)))
return newPath;
}
}
Expand Down

0 comments on commit bb8b242

Please sign in to comment.