Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This is an attempt to mitigate issue #5591 .
The
scripts_modactiveandscripts_modinstalleddirectories of installed DFHack-enabled mods were not being searched for either auto-executing modules or manually invoked scripts.This issue was traced to a relative path being compared with an absolute path. PR #5514 changed mod-detection path processing to use absolute paths, but the list of active mods was still being retrieved from DF's list of active mods, which contains relative paths.
This was fixed by prepending the base directory (normally a subdirectory of AppData, but in Portable Mode, DF's own directory) to these paths.
This patch has been tested in both AppData Mode and Portable Mode.
IMPORTANT! This patch has only been tested with DF Classic Windows.
It has not been tested with the Steam or Itch.io versions.
It has not been tested with any Linux versions.
It needs to be tested for all of these cases before being merged.
Testing: the DFHack Example scripts mod was used as a sample case. It was manually downloaded, as I don't have the Steam version of DF.