mirror of
https://github.com/purocean/yn.git
synced 2026-09-24 15:46:02 +08:00
feat: add check to return empty array for repositories with ROOT_REPO_NAME_PREFIX
This commit is contained in:
@@ -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',
|
||||
|
||||
Reference in New Issue
Block a user