Skip to content

Commit bb35a1d

Browse files
committed
1 parent ecf3aaf commit bb35a1d

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

src/vs/workbench/contrib/files/common/explorerService.ts

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,6 +40,7 @@ export class ExplorerService implements IExplorerService {
4040
private editable: { stat: ExplorerItem, data: IEditableData } | undefined;
4141
private _sortOrder: SortOrder;
4242
private cutItems: ExplorerItem[] | undefined;
43+
private fileSystemProviderSchemes = new Set<string>();
4344

4445
constructor(
4546
@IFileService private fileService: IFileService,
@@ -98,7 +99,14 @@ export class ExplorerService implements IExplorerService {
9899
this.disposables.push(this.fileService.onAfterOperation(e => this.onFileOperation(e)));
99100
this.disposables.push(this.fileService.onFileChanges(e => this.onFileChanges(e)));
100101
this.disposables.push(this.configurationService.onDidChangeConfiguration(e => this.onConfigurationUpdated(this.configurationService.getValue<IFilesConfiguration>())));
101-
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(() => this._onDidChangeItem.fire(undefined)));
102+
this.disposables.push(this.fileService.onDidChangeFileSystemProviderRegistrations(e => {
103+
if (e.added && this.fileSystemProviderSchemes.has(e.scheme)) {
104+
// A file system provider got re-registered, we should update all file stats since they might change (got read-only)
105+
this._onDidChangeItem.fire(undefined);
106+
} else {
107+
this.fileSystemProviderSchemes.add(e.scheme);
108+
}
109+
}));
102110
this.disposables.push(model.onDidChangeRoots(() => this._onDidChangeRoots.fire()));
103111

104112
return model;

0 commit comments

Comments
 (0)