microsoft / vscode-hexeditor

VS Code Hex Editor
https://marketplace.visualstudio.com/items?itemName=ms-vscode.hexeditor
MIT License
533 stars 89 forks source link

EACCESS error opening file when lacking write permission #385

Closed mpictor closed 2 years ago

mpictor commented 2 years ago

This is somewhat related to #180 but more severe: I am unable to view the file.

Given a file with mode 0o444 (aka r--r--r--, no write access) I an unable to view the file. Instead, an error pops up:

Unable to open 'file.name'
EACCESS: permission denied, open '/path/to/file.name'

Desired behavior:

If it fails to open read-write, it should try again readonly and disallow edits.

lramos15 commented 2 years ago

We don't currently have a readonly mode which is why this doesn't work. #180 would unblock this too