feat: add check to return empty array for repositories with ROOT_REPO_NAME_PREFIX

This commit is contained in:
purocean
2024-11-24 20:32:03 +08:00
parent 6e6775239f
commit 38fb3a9b11
+4
View File
@@ -407,6 +407,10 @@ async function travels (
}
export async function tree (repo: string, order: Order, include?: string | RegExp, noEmptyDir?: boolean): Promise<TreeItem[]> {
if (repo.startsWith(ROOT_REPO_NAME_PREFIX)) {
return []
}
const data: TreeItem[] = [{
name: '/',
type: 'dir',