mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-03-18 11:03:18 -04:00
Merge VS Code 1.23.1 (#1520)
This commit is contained in:
@@ -9,12 +9,16 @@ import uri from 'vs/base/common/uri';
|
||||
import { equalsIgnoreCase } from 'vs/base/common/strings';
|
||||
|
||||
export function basenameOrAuthority(resource: uri): string {
|
||||
return paths.basename(resource.fsPath) || resource.authority;
|
||||
return paths.basename(resource.path) || resource.authority;
|
||||
}
|
||||
|
||||
export function isEqualOrParent(resource: uri, candidate: uri, ignoreCase?: boolean): boolean {
|
||||
if (resource.scheme === candidate.scheme && resource.authority === candidate.authority) {
|
||||
return paths.isEqualOrParent(resource.fsPath, candidate.fsPath, ignoreCase);
|
||||
if (resource.scheme === 'file') {
|
||||
return paths.isEqualOrParent(resource.fsPath, candidate.fsPath, ignoreCase);
|
||||
}
|
||||
|
||||
return paths.isEqualOrParent(resource.path, candidate.path, ignoreCase);
|
||||
}
|
||||
|
||||
return false;
|
||||
@@ -66,4 +70,4 @@ export function distinctParents<T>(items: T[], resourceAccessor: (item: T) => ur
|
||||
}
|
||||
|
||||
return distinctParents;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user