mirror of
https://github.com/microsoft/vscode.git
synced 2025-12-23 19:59:37 +00:00
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)
This commit is contained in:
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user