The title is a bit cryptic, but the steps are really simple:
foo/.bar (without an extension)bar, get error about the file/directory existingbarExpected: Folder called bar is created.
Actual: Folder called Untitled-1 is shown on the filetree (but not created), error Uncaught TypeError: undefined is not a function is thrown at `ProjectModel#L187 and the folder is unusable until restart. After this many of the file tree functions in general don't work correctly.
Tested on: Latest master https://github.com/adobe/brackets/commit/8093791728cbff6f7734fbad41882481c82087f9, newest MacOS
ChainsawFist has found a solution to this as well. What needs to happen is that the file cache needs to be refreshed before the ProjectModel (project/ProjectModel.js) javascript goes into it's logic for the function doCreate(). Typing var fs = _getFSObject(path); as the line after var d = new $.Deferred(); in the doCreate() function seemed to have fixed the issue. However fs is never used, so while that is a solution it's not a great one. Looking at the contents of _getFSObject(path), it might actually make sense to use fs in place of both directory and file variables in the doCreate().
Using fs as the variable works in place of directory and file.
Wow, I wasn't even able to repro this on my machine...
Didn't work on your machine or you weren't seeing this bug? This worked on a Mac just to clarify what machine I'm using.
If this fixes the problem then I'll do the tests (I just have to do the smoke tests now) and create a PR.
I wasn't seeing the issue. Tried several things, but it didn't blow up.
@petetnt, are you still getting the issue?
@jamran7 couldn't replicate it anymore on my Windows 10 PC against latest master, I'll try later against my macOS too to see if this still occurs there.
Do not collaps foo/. That fixes the problem within foo because it refreshes the file index. Without collapsing the folder, say you create bar and bar/ in the work space, the problem exists.
It happens on my latest commit of Brackets
Is this still an issue @petetnt?