From 033f458d85d8c6a9c31571ff06301b7df6083c27 Mon Sep 17 00:00:00 2001 From: Kunhui Li Date: Thu, 27 May 2021 04:22:45 -0400 Subject: [PATCH] config_tools: save board xml when loading from config tool UI save the board xml into misc/config_tools/data/[board]/ when loading a new board from config tool UI. Tracked-On: #6104 Signed-off-by: Kunhui Li --- misc/config_tools/config_app/views.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/misc/config_tools/config_app/views.py b/misc/config_tools/config_app/views.py index 707c51586..e6d960604 100644 --- a/misc/config_tools/config_app/views.py +++ b/misc/config_tools/config_app/views.py @@ -676,9 +676,11 @@ def upload_board_info(): if board_type not in board_type_list: info = board_type os.makedirs(os.path.join(config_path, board_type)) + copyfile(os.path.join(os.path.dirname(os.path.abspath(__file__)), 'res', filename), + os.path.join(os.path.join(config_path, board_type), filename)) for generic_name in os.listdir(os.path.join(config_path, 'generic_board')): generic_file = os.path.join(config_path, 'generic_board', generic_name) - if os.path.isfile(generic_file): + if os.path.isfile(generic_file) and generic_name not in ['generic_board.xml']: new_file = os.path.join(config_path, board_type, generic_name) copyfile(generic_file, new_file) xml_config = XmlConfig(os.path.join(current_app.config.get('CONFIG_PATH'),