From 311638a3bff9ea8af6799dc20ae4abf8c8a52ad1 Mon Sep 17 00:00:00 2001 From: AltoXorg Date: Sun, 12 May 2024 15:55:27 +0800 Subject: [PATCH] Update path generation for individual include files. --- src/Companion.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/Companion.cpp b/src/Companion.cpp index 0ca56f6..99ca2a7 100644 --- a/src/Companion.cpp +++ b/src/Companion.cpp @@ -853,7 +853,8 @@ void Companion::ProcessFile(YAML::Node root) { } if (this->gConfig.exporterType == ExportType::Code && this->gIndividualIncludes) { - fs::path outinc = fs::path(this->gConfig.outputPath) / this->gCurrentDirectory.parent_path() / (result.name + ".inc.c"); + fs::path outinc = fs::path(this->gConfig.outputPath) / this->gCurrentDirectory.parent_path() / + fs::relative(fs::path(result.name + ".inc.c"), this->gCurrentDirectory.parent_path()); if(!exists(outinc.parent_path())){ create_directories(outinc.parent_path());