Fix #3417 Symlinks to Directories in Mods Dir Aren't Traversed (#3418)

This commit is contained in:
Salt 2023-11-24 08:40:30 -06:00 committed by GitHub
parent f2df029efa
commit d50ad4779d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -255,7 +255,7 @@ OTRGlobals::OTRGlobals() {
std::string patchesPath = LUS::Context::LocateFileAcrossAppDirs("mods", appShortName);
if (patchesPath.length() > 0 && std::filesystem::exists(patchesPath)) {
if (std::filesystem::is_directory(patchesPath)) {
for (const auto& p : std::filesystem::recursive_directory_iterator(patchesPath)) {
for (const auto& p : std::filesystem::recursive_directory_iterator(patchesPath, std::filesystem::directory_options::follow_directory_symlink)) {
if (StringHelper::IEquals(p.path().extension().string(), ".otr")) {
OTRFiles.push_back(p.path().generic_string());
}