Skip to content

[BUG] Include files are included from current directory rather than file directory #186

Description

@DarkWanderer

Describe the bug
Include path resolving does not work as expected. In SQF, #include "file" means that it will be looked for in same directory as the preprocessed file. SQFVM looks in the current working directory (cwd) instead

To Reproduce

mkdir dir
echo > dir\file.hpp
echo #include "file.hpp" > dir\file.sqf
sqfvm.exe --input-sqf "dir\\file.sqf"

Result

[ERR] [L1|C19|dir\file.sqf]     Failed to include 'file.hpp' into file 'dir\file.sqf']  ':FileIO returned no file.
Failed to preprocess file '"dir\\file.sqf"'

Expected behavior
Include should succeed

Screenshots
image

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugError, flaw, failure or fault that causes to produce an incorrect result or crash

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions