Skip to content

Files served by readonly filesystem initially lack the '(read-only)' suffix on tab labels #69651

@gjsjohnmurray

Description

@gjsjohnmurray
  • VSCode Version: 1.31.1 and 1.32.0-insider
  • OS Version: Windows_NT x64 10.0.16299

Steps to Reproduce:

  1. Obtain the MemFS sample (git clone https://github.com/Microsoft/vscode-extension-samples and then go to the fsprovider-sample subdir)

  2. Edit package.json to require a newer version of vscode than the sample's default. I changed "vscode": "^1.23.0" to "vscode": "^1.31.0". This is necessary in order to get use of the isReadonly option on vscode.workspace.registerFileSystemProvider

  3. npm install in Terminal

  4. Edit src/extension.ts to add that isReadonly: true to the options parameter.

  5. F5

  6. When Extension Development Host window opens, switch to it, press F1 and run 'MemFS: Setup Workspace', then F1 again and 'MemFS: Create Files'.

  7. Switch to Explorer view.

  8. Single-click on one of the files, e.g. file.js and observe that the tab caption lacks the '(read-only)' suffix.
    image

  9. Try typing into the document and verify it is correctly read-only.

  10. Doubleclick on the tab to persist it. The caption now gets the expected '(read-only)' suffix.
    image

Also notice the weird doubled-up '(read-only) (read-only)' on the titlebar. Is this intentional?

Metadata

Metadata

Assignees

Labels

file-explorerExplorer widget issuesinfo-neededIssue requires more information from poster

Type

No type

Projects

No projects

Relationships

None yet

Development

No branches or pull requests

Issue actions