Skip to content

Commit

Permalink
refactor: 改为while循环,并且将起始counter设置为1
Browse files Browse the repository at this point in the history
  • Loading branch information
bangbang93 committed Jun 3, 2024
1 parent 9286e9f commit 0f00f24
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/storage/webdav.storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -93,9 +93,10 @@ export class WebdavStorage implements IStorage {
return [...remoteFileList.values()]
}
let queue = [this.basePath]
let count = 0
let count = 1
let cur = 0
do {

while (queue.length !== 0) {
const nextQueue = [] as string[]
await pMap(
queue,
Expand All @@ -122,7 +123,7 @@ export class WebdavStorage implements IStorage {
},
)
queue = nextQueue
} while (queue.length !== 0)
}
return [...remoteFileList.values()]
}

Expand Down

0 comments on commit 0f00f24

Please sign in to comment.