Merge from vscode bd0efff9e3f36d6b3e1045cee9887003af8034d7

This commit is contained in:
ADS Merger
2020-05-06 02:35:49 +00:00
parent 9a7810cbee
commit 8420d9f04e
243 changed files with 4276 additions and 2478 deletions

View File

@@ -21,14 +21,13 @@ import { isLinux, isWindows } from 'vs/base/common/platform';
import { DisposableStore } from 'vs/base/common/lifecycle';
import { isEqual, joinPath } from 'vs/base/common/resources';
import { VSBuffer, VSBufferReadable, streamToBufferReadableStream, VSBufferReadableStream, bufferToReadable, bufferToStream, streamToBuffer } from 'vs/base/common/buffer';
import { find } from 'vs/base/common/arrays';
function getByName(root: IFileStat, name: string): IFileStat | undefined {
if (root.children === undefined) {
return undefined;
}
return find(root.children, child => child.name === name);
return root.children.find(child => child.name === name);
}
function toLineByLineReadable(content: string): VSBufferReadable {
@@ -442,7 +441,7 @@ suite('Disk File Service', function () {
assert.equal(resolved.isDirectory, true);
assert.equal(resolved.children!.length, 9);
const resolvedLink = resolved.children?.filter(child => child.name === 'bar' && child.isSymbolicLink)[0];
const resolvedLink = resolved.children?.find(child => child.name === 'bar' && child.isSymbolicLink);
assert.ok(resolvedLink);
assert.ok(!resolvedLink?.isDirectory);