提交 833fc7aa 编写于 作者: M Martin Aeschlimann

test fix

上级 a06dbfc3
......@@ -326,14 +326,17 @@ export class ExtHostWorkspaceProvider {
getRelativePath(pathOrUri: string | vscode.Uri, includeWorkspace?: boolean): string | undefined {
let resource: URI | undefined;
let path: string | undefined;
if (typeof pathOrUri === 'string') {
resource = URI.file(pathOrUri);
path = pathOrUri;
} else if (typeof pathOrUri !== 'undefined') {
resource = pathOrUri;
path = pathOrUri.fsPath;
}
if (!resource) {
return undefined;
return path;
}
const folder = this.getWorkspaceFolder(
......@@ -342,7 +345,7 @@ export class ExtHostWorkspaceProvider {
);
if (!folder) {
return resource.fsPath;
return path;
}
if (typeof includeWorkspace === 'undefined' && this._actualWorkspace) {
......
......@@ -195,7 +195,7 @@ export class ResourceGlobMatcher extends Disposable {
// but can match on "src/file.txt"
let resourcePathToMatch: string;
if (folder) {
resourcePathToMatch = relativePath(folder.uri, resource); // always uses forward slashes
resourcePathToMatch = relativePath(folder.uri, resource)!; // always uses forward slashes
} else {
resourcePathToMatch = resource.fsPath; // TODO@isidor: support non-file URIs
}
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册