Skip to content

Support relative file Paths for parseFileHeader #101

@tschierz

Description

@tschierz

Problem
OpenCRG supports master .crg files that reference other .crg files via relative paths. Currently, these paths are resolved relative to the current working directory (CWD) rather than relative to the master .crg file's location. This breaks file references whenever the CWD differs from the master file's directory - which is the common case.

Expected behavior
Relative paths in a .crg file should be resolved relative to the directory containing that .crg file, consistent with how most file formats (e.g., XML, CMake, HTML) handle relative includes.

Proposed fix
When loading a master .crg file with parseFileHeader() in crgLoader, derive the base directory from the master file's path and resolve any referenced relative paths against that base directory instead of the CWD.

Metadata

Metadata

Assignees

No one assigned

    Labels

    isState:NewA new issue that needs to be classified to a type.isType:FeatureImprovementAn issue that amends or improves existing features.

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions