From 1164d2de8de577aa7c97a187f20d08c26550eaf1 Mon Sep 17 00:00:00 2001 From: Calvin Zhang Date: Thu, 26 May 2022 14:37:07 +0800 Subject: [PATCH] misc: configurator: Delete old .board.xml after reselect a new one Delete old .board.xml after reselect a new one so that there will be only one working .board.xml in working directory Tracked-On: #7597 Signed-off-by: Calvin Zhang --- .../packages/configurator/src/pages/Config/Board.vue | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/misc/config_tools/configurator/packages/configurator/src/pages/Config/Board.vue b/misc/config_tools/configurator/packages/configurator/src/pages/Config/Board.vue index 3454ea5a5..517343ec3 100644 --- a/misc/config_tools/configurator/packages/configurator/src/pages/Config/Board.vue +++ b/misc/config_tools/configurator/packages/configurator/src/pages/Config/Board.vue @@ -132,6 +132,10 @@ export default { let filepath = '' if (useNewFile) { filepath = this.newFilePath + if (filepath != this.currentSelectedBoard) { + configurator.removeFile(this.currentSelectedBoard) + .catch((err) => alert(`${err}`)) + } } else { filepath = this.currentSelectedBoard }