mozilla / brackets

An open source code editor for the web, written in JavaScript, HTML and CSS.
http://brackets.io
MIT License
176 stars 278 forks source link

Renaming files with same name gives "Unknown Error" warning #259

Closed JordanTheriault closed 9 years ago

JordanTheriault commented 9 years ago

When renaming files, the user is given an unknown warning when they attempt to name a file the same as another one in the directory.

This should give an error which informs the user there is already a file with the same name.

screenshot 2015-05-11 09 49 38

humphd commented 9 years ago

I tried this in desktop Brackets, and it does this:

screen shot 2015-05-12 at 12 58 36 pm

The error message comes from our filesystem impl, where we map Filer errors to Brackets errors. The fix will be in https://github.com/humphd/brackets/blob/bramble/src/filesystem/impls/filer/FilerFileSystem.js#L28-L59 to catch the error you get when the other file exists, probably EEXIST but I'd have to confirm.