-
Notifications
You must be signed in to change notification settings - Fork 73
Enhancement: Saving a read-only file #107
Comments
I'm assuming if you don't re-throw the error it won't get displayed. In the catch block check that it's the error you're looking for then eat it IFF the user returns yes on the dialog. I hope you're still planning on checking this in (once you fix that) It's a feature I know a TON of people want. |
fs.stat() returns the result in a callback function, so I would have to save the exception, and wait for the result of fs.stat. Then, if the user did not confirm overwrite I could rethrow the exception from that callback. For some reason this did not seem to work, I was getting unhandled promise rejection errors. |
Precedence in coffeescript is a little strange, make sure .catch is getting a function passed into it. |
This would be really nice. Since I work with Perforce all files are readonly and it's quite burdensome to have to keep switching to the Perforce interface or command line tools to unlock them. |
Saving a read-only file in Atom is not possible, it results in an error (Atom Issue #9056). I looked into implementing such a feature, text-buffer seems to be a good place. Please take a look at my implementation. My question is:
The text was updated successfully, but these errors were encountered: