From ef2e038b11b685c1caf43d238475ca066bb77ea8 Mon Sep 17 00:00:00 2001 From: Jason Simmons Date: Thu, 29 Oct 2015 14:27:08 -0700 Subject: [PATCH] Generalize path handling in flutter init This will make "-o ." work as expected to initialize a project in the current directory --- packages/flutter_tools/lib/src/commands/init.dart | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/flutter_tools/lib/src/commands/init.dart b/packages/flutter_tools/lib/src/commands/init.dart index 57eac43411..0290d1e093 100644 --- a/packages/flutter_tools/lib/src/commands/init.dart +++ b/packages/flutter_tools/lib/src/commands/init.dart @@ -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);