Skip to content

Commit 462fb54

Browse files
committed
1 parent 91659bf commit 462fb54

1 file changed

Lines changed: 9 additions & 4 deletions

File tree

extensions/git/src/model.ts

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,11 +93,16 @@ export class Model {
9393
private async scanWorkspaceFolders(): Promise<void> {
9494
for (const folder of workspace.workspaceFolders || []) {
9595
const root = folder.uri.fsPath;
96-
const children = await new Promise<string[]>((c, e) => fs.readdir(root, (err, r) => err ? e(err) : c(r)));
9796

98-
children
99-
.filter(child => child !== '.git')
100-
.forEach(child => this.tryOpenRepository(path.join(root, child)));
97+
try {
98+
const children = await new Promise<string[]>((c, e) => fs.readdir(root, (err, r) => err ? e(err) : c(r)));
99+
100+
children
101+
.filter(child => child !== '.git')
102+
.forEach(child => this.tryOpenRepository(path.join(root, child)));
103+
} catch (err) {
104+
// noop
105+
}
101106
}
102107
}
103108

0 commit comments

Comments
 (0)