From 60e08b196c46a685d570b51035787b1831808b77 Mon Sep 17 00:00:00 2001 From: Jimmy Brisson Date: Wed, 13 Jun 2018 13:56:21 -0500 Subject: [PATCH] Don't flatten build directories Make a really good guess --- tools/resources/__init__.py | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tools/resources/__init__.py b/tools/resources/__init__.py index 20856c9cdf..43a321ab9a 100644 --- a/tools/resources/__init__.py +++ b/tools/resources/__init__.py @@ -482,10 +482,15 @@ class Resources(object): self.add_toolchain_labels(toolchain) for path in src_paths: if exists(path): + into_path = relpath(path).strip(".\\/") if exclude: - self.add_directory(path, into_path="", exclude_paths=[toolchain.build_dir]) + self.add_directory( + path, + into_path=into_path, + exclude_paths=[toolchain.build_dir] + ) else: - self.add_directory(path, into_path="") + self.add_directory(path, into_path=into_path) # Scan dependency paths for include dirs if dependencies_paths is not None: