Include authority in TS in-memory scheme (#148940)
For #146853 Make sure we include the uri authority when serializing and then restoring the file paths we send to TSServer (similarly to how we already handle the uri scheme)pull/148955/head
parent
d999b5ff79
commit
10c8c1c2cc
|
@ -674,7 +674,9 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
}
|
||||
default:
|
||||
{
|
||||
return this.inMemoryResourcePrefix + '/' + resource.scheme
|
||||
return this.inMemoryResourcePrefix
|
||||
+ '/' + resource.scheme
|
||||
+ '/' + resource.authority
|
||||
+ (resource.path.startsWith('/') ? resource.path : '/' + resource.path)
|
||||
+ (resource.fragment ? '#' + resource.fragment : '');
|
||||
}
|
||||
|
@ -724,7 +726,7 @@ export default class TypeScriptServiceClient extends Disposable implements IType
|
|||
if (filepath.startsWith(this.inMemoryResourcePrefix)) {
|
||||
const parts = filepath.match(/^\^\/([^\/]+)\/(.+)$/);
|
||||
if (parts) {
|
||||
const resource = vscode.Uri.parse(parts[1] + ':/' + parts[2]);
|
||||
const resource = vscode.Uri.parse(parts[1] + '://' + parts[2]);
|
||||
return this.bufferSyncSupport.toVsCodeResource(resource);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue