From 9ad140f4f2e1298887ead5b363e00b073538f2c6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?R=C3=A9mi=20Verschelde?= Date: Tue, 9 Apr 2024 22:03:18 +0200 Subject: [PATCH] SCons: Fix SCU build regression on Windows PR #89452 made assumptions on comparing paths as strings which doesn't work when composing them as POSIX paths (`/`) but processing them on NT (`\`, `\\`). --- scu_builders.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/scu_builders.py b/scu_builders.py index b180cbc8647..e6adf6543c2 100644 --- a/scu_builders.py +++ b/scu_builders.py @@ -23,8 +23,9 @@ def clear_out_stale_files(output_folder, extension, fresh_files): return for file in glob.glob(output_folder + "/*." + extension): + file = Path(file) if not file in fresh_files: - # print("removed stale file: " + file) + # print("removed stale file: " + str(file)) os.remove(file) @@ -97,7 +98,7 @@ def write_output_file(file_count, include_list, start_line, end_line, output_fol elif _verbose: print("SCU: Generation not needed for: " + short_filename) - return output_filename + return output_path def write_exception_output_file(file_count, exception_string, output_folder, output_filename_prefix, extension): @@ -124,7 +125,7 @@ def write_exception_output_file(file_count, exception_string, output_folder, out elif _verbose: print("SCU: Generation not needed for: " + short_filename) - return output_filename + return output_path def find_section_name(sub_folder):