From 0989a478c64c7dab0399988efc72cd7439f83612 Mon Sep 17 00:00:00 2001
From: gifrerenom <lluis.gifre@cttc.es>
Date: Mon, 15 Apr 2024 17:19:02 +0000
Subject: [PATCH] Scripts:

- Updated file mode update in update_license_headers.py script
---
 scripts/update_license_headers.py | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/update_license_headers.py b/scripts/update_license_headers.py
index 88f511387..62a166f17 100644
--- a/scripts/update_license_headers.py
+++ b/scripts/update_license_headers.py
@@ -87,6 +87,7 @@ def process_file(
 
     temp_file_path = file_path + '.temp'
     replaced = False
+    file_mode = os.stat(file_path)
     try:
         with open(file_path, encoding='UTF-8') as source:
             with open(temp_file_path, 'w', encoding='UTF-8') as target:
@@ -103,6 +104,7 @@ def process_file(
         file_updated.write(file_path + '\n')
 
     os.rename(temp_file_path, file_path)
+    os.chmod(file_path, file_mode)
 
 def main() -> int:
     with open(FILE_PATH_NO_HEADER, 'w', encoding='UTF-8') as file_no_header:
-- 
GitLab