Page MenuHomeFeedback Tracker

Unintended behavior of __has_include with file patching
Closed, ResolvedPublic


__has_include matches files in unpacked mods even if the mod is not loaded.


Operating System
Windows 10 x64
Steps To Reproduce
  1. Unpack a mod and place it in the Arma 3 root directory.
  2. Create a dummy mod that checks for a file inside the unpacked mod with __has_include.
  3. Start game with file patching enabled, but only load the dummy mod.
  4. Notice that __has_include was true for the dummy mod.

Event Timeline

ookexoo created this task.Oct 2 2021, 6:10 PM
ookexoo edited Steps To Reproduce. (Show Details)

It would be useful if we had a version of __has_include that only checked the internal/virtual file system and not the Arma folder.

dedmen closed this task as Resolved.Oct 6 2021, 6:47 PM
dedmen claimed this task.
dedmen added a subscriber: dedmen.

Fixed on 7th june already...

That fix actually is the root of this issue. Yes, __has_include matches unpacked mods now when file patching is enabled. Problem is that it does so regardless whether the mod is actually loaded or not.

dedmen added a comment.Oct 6 2021, 9:41 PM

Wuht? But the fix did the opposite.
It removed the ability to load files from disk if filePatching is disabled.

Like.. thats EXACTLY what was fixed.

ookexoo added a comment.EditedOct 13 2021, 10:06 PM

I'm sorry for the confusion I created. We were trying to get rid of ACE optionals for ZEN by using __has_include, but still have issues with file patching.
At this point it's more likely an issue on our end, since I take your word that it was fixed. Hence, consider it as resolved.