Update: 更新ampy

This commit is contained in:
王立帮
2024-08-17 23:59:17 +08:00
parent 29f15dd7d4
commit edce8ed5bc
8 changed files with 46 additions and 34 deletions

View File

@@ -130,7 +130,7 @@ class AmpyFS extends FS {
let stdout = [], error = null;
try {
const output = await this.#ampy_.ls(this.#port_, this.#baud_, folderPath);
const dirs = Array.from(output.stdout.split('\r\n'));
const dirs = Array.from(new Set(output.stdout.split('\r\n')));
for (let i in dirs) {
if (!dirs[i]) {
continue;