fix: protect file list download

This commit is contained in:
tdurieux
2024-01-12 15:31:09 +01:00
parent 9a48aa1fa2
commit b103370d2b

View File

@@ -170,7 +170,14 @@ export default class GitHubStream extends GitHubBase implements SourceBase {
);
count.request++;
const data = await this.getGHTree(sha, { recursive: false });
this.tree2Tree(data.tree, truncatedTree, parentPath);
try {
this.tree2Tree(data.tree, truncatedTree, parentPath);
} catch (error) {
console.error(error);
this.repository.model.truckedFileList = true;
return;
}
count.file += data.tree.length;
if (data.tree.length < 100 && count.request < 200) {