mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-02-16 18:46:40 -05:00
Merge from vscode bd0efff9e3f36d6b3e1045cee9887003af8034d7
This commit is contained in:
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user