mirror of
https://github.com/microsoft/vscode.git
synced 2026-04-26 03:29:00 +01:00
send file system info with dummy uri, https://github.com/microsoft/vscode-remote-release/issues/5714
this ensures uris undergo transformation and therefore file and vscode-remotes are handled correctlly
This commit is contained in:
@@ -27,10 +27,10 @@ export class MainThreadFileSystem implements MainThreadFileSystemShape {
|
||||
const infoProxy = extHostContext.getProxy(ExtHostContext.ExtHostFileSystemInfo);
|
||||
|
||||
for (let entry of _fileService.listCapabilities()) {
|
||||
infoProxy.$acceptProviderInfos(entry.scheme, entry.capabilities);
|
||||
infoProxy.$acceptProviderInfos(URI.from({ scheme: entry.scheme, path: '/dummy' }), entry.capabilities);
|
||||
}
|
||||
this._disposables.add(_fileService.onDidChangeFileSystemProviderRegistrations(e => infoProxy.$acceptProviderInfos(e.scheme, e.provider?.capabilities ?? null)));
|
||||
this._disposables.add(_fileService.onDidChangeFileSystemProviderCapabilities(e => infoProxy.$acceptProviderInfos(e.scheme, e.provider.capabilities)));
|
||||
this._disposables.add(_fileService.onDidChangeFileSystemProviderRegistrations(e => infoProxy.$acceptProviderInfos(URI.from({ scheme: e.scheme, path: '/dummy' }), e.provider?.capabilities ?? null)));
|
||||
this._disposables.add(_fileService.onDidChangeFileSystemProviderCapabilities(e => infoProxy.$acceptProviderInfos(URI.from({ scheme: e.scheme, path: '/dummy' }), e.provider.capabilities)));
|
||||
}
|
||||
|
||||
dispose(): void {
|
||||
|
||||
@@ -295,7 +295,7 @@ export interface MainThreadTextEditorsShape extends IDisposable {
|
||||
}
|
||||
|
||||
export interface MainThreadTreeViewsShape extends IDisposable {
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined}): Promise<void>;
|
||||
$registerTreeViewDataProvider(treeViewId: string, options: { showCollapseAll: boolean, canSelectMany: boolean, dragAndDropMimeTypes: string[] | undefined }): Promise<void>;
|
||||
$refresh(treeViewId: string, itemsToRefresh?: { [treeItemHandle: string]: ITreeItem; }): Promise<void>;
|
||||
$reveal(treeViewId: string, itemInfo: { item: ITreeItem, parentChain: ITreeItem[] } | undefined, options: IRevealOptions): Promise<void>;
|
||||
$setMessage(treeViewId: string, message: string): void;
|
||||
@@ -1289,7 +1289,7 @@ export interface ExtHostWorkspaceShape {
|
||||
}
|
||||
|
||||
export interface ExtHostFileSystemInfoShape {
|
||||
$acceptProviderInfos(scheme: string, capabilities: number | null): void;
|
||||
$acceptProviderInfos(uri: UriComponents, capabilities: number | null): void;
|
||||
}
|
||||
|
||||
export interface ExtHostFileSystemShape {
|
||||
|
||||
@@ -5,6 +5,7 @@
|
||||
|
||||
import { Schemas } from 'vs/base/common/network';
|
||||
import { ExtUri, IExtUri } from 'vs/base/common/resources';
|
||||
import { UriComponents } from 'vs/base/common/uri';
|
||||
import { FileSystemProviderCapabilities } from 'vs/platform/files/common/files';
|
||||
import { createDecorator } from 'vs/platform/instantiation/common/instantiation';
|
||||
import { ExtHostFileSystemInfoShape } from 'vs/workbench/api/common/extHost.protocol';
|
||||
@@ -33,11 +34,11 @@ export class ExtHostFileSystemInfo implements ExtHostFileSystemInfoShape {
|
||||
});
|
||||
}
|
||||
|
||||
$acceptProviderInfos(scheme: string, capabilities: number | null): void {
|
||||
$acceptProviderInfos(uri: UriComponents, capabilities: number | null): void {
|
||||
if (capabilities === null) {
|
||||
this._providerInfo.delete(scheme);
|
||||
this._providerInfo.delete(uri.scheme);
|
||||
} else {
|
||||
this._providerInfo.set(scheme, capabilities);
|
||||
this._providerInfo.set(uri.scheme, capabilities);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user