From b680a6ec72da4191eb3ae28ec010cfbf05333936 Mon Sep 17 00:00:00 2001 From: Jamie McCrae Date: Fri, 8 Mar 2024 11:41:38 +0000 Subject: [PATCH] scripts: snippets: Fix path output on windows Fixes an issue with paths being output in windows-style with back slashes, this causes issues for certain escape sequences when cmake interprets them. Replace these paths with posix paths so that they are not treated as possible escape sequences. Signed-off-by: Jamie McCrae --- scripts/snippets.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/snippets.py b/scripts/snippets.py index 48733ee3b55..625f101ec63 100644 --- a/scripts/snippets.py +++ b/scripts/snippets.py @@ -56,7 +56,7 @@ class Snippet: path = pathobj.parent / value if not path.is_file(): _err(f'snippet file {pathobj}: {variable}: file not found: {path}') - return f'"{path}"' + return f'"{path.as_posix()}"' if variable in ('DTS_EXTRA_CPPFLAGS'): return f'"{value}"' _err(f'unknown append variable: {variable}')