From f1f4769a21d55e73029dd5339b7166d44bcf3e72 Mon Sep 17 00:00:00 2001 From: Mathieu Benoit Date: Tue, 4 Nov 2025 22:09:07 -0500 Subject: [PATCH] [FIX] script format support space into files --- script/maintenance/format_file_to_commit.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/script/maintenance/format_file_to_commit.py b/script/maintenance/format_file_to_commit.py index 0900f38..05d900c 100755 --- a/script/maintenance/format_file_to_commit.py +++ b/script/maintenance/format_file_to_commit.py @@ -31,6 +31,14 @@ def get_modified_files(): continue try: + has_space = False + file_path_space = "" + if '"' in line: + has_space = True + file_path_space = line[ + line.index('"') + 1 : line.rindex('"') + ] + line = line.replace(f'"{file_path_space}"', "replace") if "->" in line: # Example : M file_01 -> file_02 status, old_file_path, code, file_path = ( @@ -41,6 +49,9 @@ def get_modified_files(): status, file_path = ( line.strip().replace(" ", " ").split(" ") ) + if has_space: + file_path = file_path_space + except Exception as e: print(f"'{line}'") raise e