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

Commit

Permalink
Fixes wrong function call in ProjectManager.js (#13611)
Browse files Browse the repository at this point in the history
The createNewItem function in ProjectManager.js calls the createAtPath in Projectmodel.js.

The function call expects a single parameter, which is the path at which the file must be created.
And it expects a "/" in the end of the path in case it is a folder.

However, right now 2 parameters are being passed. One of them being the isFolder variable.
  • Loading branch information
hkirat authored and swmitra committed Aug 13, 2017
1 parent baf964e commit 90335e4
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion src/project/ProjectManager.js
Original file line number Diff line number Diff line change
Expand Up @@ -1072,7 +1072,10 @@ define(function (require, exports, module) {
baseDir = model.getDirectoryInProject(baseDir);

if (skipRename) {
return model.createAtPath(baseDir + initialName, isFolder);
if(isFolder) {
return model.createAtPath(baseDir + initialName + "/");
}
return model.createAtPath(baseDir + initialName);
}
return actionCreator.startCreating(baseDir, initialName, isFolder);
}
Expand Down

0 comments on commit 90335e4

Please sign in to comment.