From 74a6f5961bc82ef5887ddb7407a8798dc282b2c5 Mon Sep 17 00:00:00 2001 From: Scott Lahteine Date: Thu, 18 May 2023 03:03:54 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=94=A8=20Fix=20Windows=20path=20backslash?= =?UTF-8?q?=20treated=20as=20escape?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Luc <8822552+luc-github@users.noreply.github.com> --- .../share/PlatformIO/scripts/common-dependencies.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/buildroot/share/PlatformIO/scripts/common-dependencies.py b/buildroot/share/PlatformIO/scripts/common-dependencies.py index aa531be29685..e90ba24dd349 100644 --- a/buildroot/share/PlatformIO/scripts/common-dependencies.py +++ b/buildroot/share/PlatformIO/scripts/common-dependencies.py @@ -55,10 +55,11 @@ def add_to_feat_cnf(feature, flines): # Get a reference to the FEATURE_CONFIG under construction feat = FEATURE_CONFIG[feature] - # Split up passed lines on commas or newlines and iterate - # Add common options to the features config under construction - # For lib_deps replace a previous instance of the same library - atoms = re.sub(r',\s*', '\n', flines).strip().split('\n') + # Split up passed lines on commas or newlines and iterate. + # Take care to convert Windows '\' paths to Unix-style '/'. + # Add common options to the features config under construction. + # For lib_deps replace a previous instance of the same library. + atoms = re.sub(r',\s*', '\n', flines.replace('\\', '/')).strip().split('\n') for line in atoms: parts = line.split('=') name = parts.pop(0)