fix: protect file list download

This commit is contained in:
tdurieux
2024-01-12 15:11:46 +01:00
parent c2a885fdaa
commit 9a48aa1fa2

View File

@@ -191,9 +191,14 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
}
await Promise.all(promises);
} else {
const data = await this.getGHTree(sha, { recursive: true });
this.tree2Tree(data.tree, truncatedTree, parentPath);
if (data.truncated) {
try {
const data = await this.getGHTree(sha, { recursive: true });
this.tree2Tree(data.tree, truncatedTree, parentPath);
if (data.truncated) {
this.repository.model.truckedFileList = true;
}
} catch (error) {
console.error(error);
this.repository.model.truckedFileList = true;
}
}