From b805d2e94937976bb17d0439f57fcd3a9d423c31 Mon Sep 17 00:00:00 2001 From: rebornix Date: Mon, 19 Jul 2021 18:40:15 -0700 Subject: [PATCH] fix notebook content provider readonly --- .../contrib/notebook/common/notebookEditorModel.ts | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts index 6658ea671e0..bfb60576259 100644 --- a/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts +++ b/src/vs/workbench/contrib/notebook/common/notebookEditorModel.ts @@ -127,7 +127,11 @@ export class ComplexNotebookEditorModel extends EditorModel implements INotebook } isReadonly(): boolean { - return false; + if (this._fileService.hasCapability(this.resource, FileSystemProviderCapabilities.Readonly)) { + return true; + } else { + return false; + } } isOrphaned(): boolean {