You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When Ship loads OTRs out of ./mods, the following behavior is observed:
Files with the file extension .otr are loaded
Directories that contain .otr files are traversed and .otr files within are loaded
Symbolic links to .otr files are loaded
Based on this behavior one would expect symbolic links to directories to be traversed for .otr files. This is not the case -- Ship does not traverse symlinks in ./mods.
if (patchesPath.length() > 0 && std::filesystem::exists(patchesPath)) {
if (std::filesystem::is_directory(patchesPath)) {
for (constauto& p : std::filesystem::recursive_directory_iterator(patchesPath)) {
if (StringHelper::IEquals(p.path().extension().string(), ".otr")) {
OTRFiles.push_back(p.path().generic_string());
}
}
}
}
According to upstream documentation, std::filesystem::recursive_directory_iterator just needs an option specified at construction time telling it it's allowed to traverse symlinks.
Fixing this bug would allow for more versatile mod management and consistent behavior.
The text was updated successfully, but these errors were encountered:
When Ship loads OTRs out of
./mods
, the following behavior is observed:.otr
are loaded.otr
files are traversed and.otr
files within are loaded.otr
files are loadedBased on this behavior one would expect symbolic links to directories to be traversed for
.otr
files. This is not the case -- Ship does not traverse symlinks in./mods
.Errant code is here: https://github.com/HarbourMasters/Shipwright/blob/8dbf738128d0c9d2a0e6c7ece40fa4659edafc1c/soh/soh/OTRGlobals.cpp#L258C34-L258C79
According to upstream documentation,
std::filesystem::recursive_directory_iterator
just needs an option specified at construction time telling it it's allowed to traverse symlinks.Fixing this bug would allow for more versatile mod management and consistent behavior.
The text was updated successfully, but these errors were encountered: