File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -326,14 +326,17 @@ export class ExtHostWorkspaceProvider {
326326 getRelativePath ( pathOrUri : string | vscode . Uri , includeWorkspace ?: boolean ) : string | undefined {
327327
328328 let resource : URI | undefined ;
329+ let path : string | undefined ;
329330 if ( typeof pathOrUri === 'string' ) {
330331 resource = URI . file ( pathOrUri ) ;
332+ path = pathOrUri ;
331333 } else if ( typeof pathOrUri !== 'undefined' ) {
332334 resource = pathOrUri ;
335+ path = pathOrUri . fsPath ;
333336 }
334337
335338 if ( ! resource ) {
336- return undefined ;
339+ return path ;
337340 }
338341
339342 const folder = this . getWorkspaceFolder (
@@ -342,7 +345,7 @@ export class ExtHostWorkspaceProvider {
342345 ) ;
343346
344347 if ( ! folder ) {
345- return resource . fsPath ;
348+ return path ;
346349 }
347350
348351 if ( typeof includeWorkspace === 'undefined' && this . _actualWorkspace ) {
Original file line number Diff line number Diff line change @@ -195,7 +195,7 @@ export class ResourceGlobMatcher extends Disposable {
195195 // but can match on "src/file.txt"
196196 let resourcePathToMatch : string ;
197197 if ( folder ) {
198- resourcePathToMatch = relativePath ( folder . uri , resource ) ; // always uses forward slashes
198+ resourcePathToMatch = relativePath ( folder . uri , resource ) ! ; // always uses forward slashes
199199 } else {
200200 resourcePathToMatch = resource . fsPath ; // TODO@isidor : support non-file URIs
201201 }
You can’t perform that action at this time.
0 commit comments