adobe/brackets — pull request #1791 by gruehle (2012-10-07 10:26:01+00:00)
Title: Don't collapse project folders if a rename fails

Fixes issue #1786

Use `sort` instead of `refresh` if a rename fails. There are two ways a rename can fail:

1. Entering an invalid character in the filename. This is caught early, before the file system item is renamed.
2. Error returned from the file system rename command.

The sort/refresh is included to ensure the tree is re-sorted in condition 2.