Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

JS crash when trying to save over read-only file #52

Closed
peterflynn opened this issue Jan 9, 2012 · 3 comments · Fixed by #6103
Closed

JS crash when trying to save over read-only file #52

peterflynn opened this issue Jan 9, 2012 · 3 comments · Fixed by #6103
Assignees
Milestone

Comments

@peterflynn
Copy link
Member

Steps:

  1. Open a file that is read-only in the filesystem
  2. Make some edits
  3. Cmd+S

Result:
Crash in FileCommandHandlers, in the writer.onerror handler nested within handleFileSave().
It looks like it is expecting to be called with a dispatched event as its argument, while NativeFileSystem is invoking it directly and simply passing it an un-wrapped error object (not an event).

Expected:
No crash. User-friendly error dialog appears indicating file not saved.

@peterflynn
Copy link
Member Author

Btw, if our unit tests didn't catch this maybe it's a sign that we need some higher-level, UI-automation-like tests? Silently dropping file-save errors on the floor and not notifying the user of them is the kind of bug we want to avoid pretty carefully, I think...

@jasonsanjose
Copy link
Member

Hey @peterflynn, can you close this out?

@ghost ghost assigned peterflynn Jan 19, 2012
@peterflynn
Copy link
Member Author

I've verified the bug no longer repros for my case either (a file on a network share with readonly access). Closing...

busykai added a commit to busykai/brackets that referenced this issue Nov 24, 2013
This version is required to load and run brackets properly on
node-webkit. See requirejs/text#55 for node-specific details.
Summary of changes:
  > rev to 2.0.10
  > Merge pull request adobe#61 from AnSavvides/master
  > Merge pull request adobe#60 from dakota/patch-1
  > rev to 2.0.9
  > Merge pull request adobe#55 from busykai/master
  > Fixes adobe#57 xpcshell: windows FileUtils.File does not like / paths
  > Rev version for 2.0.7
  > Fixes adobe#52, handle non-existent files in node
  > Fixes issue mentioned in comments for requirejs/r.js#221 about Java usage
  > Merge pull request adobe#49 from fsbdev/patch-1
gideonthomas pushed a commit to gideonthomas/brackets that referenced this issue Feb 24, 2015
Fixed adobe#42 - Make thimble conceal brackets until it's loaded
ficristo pushed a commit to ficristo/brackets that referenced this issue Jan 11, 2016
Update dependencies and merge latest master
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants