Skip to content

Commit

Permalink
Fixes #50828, code-insiders --status triggered exception in main process
Browse files Browse the repository at this point in the history
  • Loading branch information
Rachel Macfarlane committed May 31, 2018
1 parent c8ff448 commit a0fce79
Showing 1 changed file with 19 additions and 19 deletions.
38 changes: 19 additions & 19 deletions src/vs/base/node/stats.ts
Original file line number Diff line number Diff line change
Expand Up @@ -116,32 +116,32 @@ export function collectWorkspaceStats(folder: string, filter: string[]): Promise
if (--pending === 0) {
return done(results);
}
}

if (stats.isDirectory()) {
if (filter.indexOf(file) === -1) {
walk(join(dir, file), filter, token, (res: string[]) => {
results = results.concat(res);
} else {
if (stats.isDirectory()) {
if (filter.indexOf(file) === -1) {
walk(join(dir, file), filter, token, (res: string[]) => {
results = results.concat(res);

if (--pending === 0) {
return done(results);
}
});
} else {
if (--pending === 0) {
return done(results);
done(results);
}
});
}
} else {
if (--pending === 0) {
done(results);
if (token.count >= MAX_FILES) {
token.maxReached = true;
}
}
} else {
if (token.count >= MAX_FILES) {
token.maxReached = true;
}

token.count++;
results.push(file);
token.count++;
results.push(file);

if (--pending === 0) {
done(results);
if (--pending === 0) {
done(results);
}
}
}
});
Expand Down

0 comments on commit a0fce79

Please sign in to comment.