'lime create' patch

This commit is contained in:
Joshua Granick
2014-10-21 06:07:18 -07:00
parent 75e424b467
commit a3bd5e8111
2 changed files with 17 additions and 7 deletions

View File

@@ -237,11 +237,21 @@ class CreateTemplate {
PathHelper.mkdir (folder);
FileHelper.recursiveCopyTemplate (project.templatePaths, "project", folder, context);
if (FileSystem.exists (folder + "/Project.hxproj")) {
try {
FileSystem.rename (folder + "/Project.hxproj", folder + "/" + title + ".hxproj");
if (FileSystem.exists (folder + "/Project.hxproj")) {
if (FileSystem.exists (folder + "/" + title + ".hxproj")) {
FileSystem.deleteFile (folder + "/" + title + ".hxproj");
}
FileSystem.rename (folder + "/Project.hxproj", folder + "/" + title + ".hxproj");
}
}
} catch (e:Dynamic) {}
return;