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 <calvinzhang.cool@gmail.com>
This commit is contained in:
Calvin Zhang 2022-05-26 14:37:07 +08:00 committed by acrnsi-robot
parent 4cd762f567
commit 1b9328c76f

View File

@ -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
}