ProjectManager.createNewItem('/path', 'name', false, true) successfully creates a directory without skipping renaming.
ProjectManager.createNewItem('/path', 'name', true, true) will skip renaming, but creates a file even though isFolder is true.
Expected behavior: A folder is created when isFolder is true, regardless of skipRename.
Actual behavior: Only files are created when skipRename is true.
OSX 10.11.6
Brackets 1.9 build 1.9.0-17312 (release 189f6d39a)
createNewItem is passing the isFolder argument:
return model.createAtPath(baseDir + initialName, isFolder);
But the definition of this method on the model has no such argument, so it's being ignored.
ProjectModel.prototype.createAtPath = function (path) {
var isFolder = !_pathIsFile(path)
Should be as simple as adding the argument. Will be making a PR soon.
@RationalCoding sounds good to me.
You supply the PR and we will review.
Most helpful comment
createNewItemis passing theisFolderargument:But the definition of this method on the model has no such argument, so it's being ignored.
Should be as simple as adding the argument. Will be making a PR soon.