Skip to content
This repository was archived by the owner on Mar 3, 2023. It is now read-only.

Allow opening of readonly files - #5114

Merged
benogle merged 5 commits into
masterfrom
bo-readonly
Jan 16, 2015
Merged

benogle merged 5 commits into
masterfrom
bo-readonly

Conversation

@benogle

@benogle benogle commented Jan 16, 2015

Copy link
Copy Markdown
Contributor
  • Checks that it can open as read rather than read/write; this will fix the EPERM and EBUSY errors on read.
  • Makes the error better for EPERM and EBUSY errors when they do happen on save

Closes #5102
Closes #5107
Closes #5112
Closes #3231

Comment thread src/project.coffee

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This makes me nervous in terms of speed. Now for all open files, we need to hit the disk twice: check if dir, and check if we can read it.

I needed to do this as opening with only r does not throw an error when there is a directory.

Comment thread src/workspace.coffee Outdated

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe just do when 'EPERM', 'EBUSY' here, the messages look similar.

@artagnon

Copy link
Copy Markdown

Atom v1.2.3, 11/19/2015.

On Mac, for a readonly file:
screen shot 2015-10-01 at 3 29 20 pm

Password?! I have permissions.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

3 participants