Generalize path handling in flutter init

This will make "-o ." work as expected to initialize a project in the
current directory
This commit is contained in:
Jason Simmons
2015-10-29 14:27:08 -07:00
parent 79ceee73b2
commit ef2e038b11

View File

@@ -67,7 +67,8 @@ abstract class Template {
Template(this.name, this.description);
void generateInto(Directory dir) {
String projectName = _normalizeProjectName(p.basename(dir.path));
String dirPath = p.normalize(dir.absolute.path);
String projectName = _normalizeProjectName(p.basename(dirPath));
print('Creating ${p.basename(projectName)}...');
dir.createSync(recursive: true);