Index: dart/frog/leg/frog_leg.dart |
diff --git a/dart/frog/leg/frog_leg.dart b/dart/frog/leg/frog_leg.dart |
index 8c1e28bcf73036a2cef800a0bfc8fc0fa3dda54d..9535057c9d40685d90e6d1a9e0dd324404990d08 100644 |
--- a/dart/frog/leg/frog_leg.dart |
+++ b/dart/frog/leg/frog_leg.dart |
@@ -4,11 +4,12 @@ |
#library('frog_leg'); |
+#import('dart:io'); |
+ |
#import('../../lib/uri/uri.dart'); |
#import('source_file.dart'); |
#import('../lang.dart', prefix: 'frog'); |
#import('api.dart', prefix: 'api'); |
-#import('io/io.dart', prefix: 'io'); |
String relativize(Uri base, Uri uri) { |
if (base.scheme == 'file' && |
@@ -45,12 +46,12 @@ bool compile(frog.World world) { |
final showWarnings = frog.options.showWarnings; |
final allowMockCompilation = frog.options.allowMockCompilation; |
// final compiler = new WorldCompiler(world, throwOnError); |
- Uri cwd = new Uri(scheme: 'file', path: io.getCurrentDirectory()); |
+ Uri cwd = new Uri(scheme: 'file', path: getCurrentDirectory()); |
Uri uri = cwd.resolve(frog.options.dartScript); |
String frogLibDir = frog.options.libDir; |
if (!frogLibDir.endsWith("/")) frogLibDir = "$frogLibDir/"; |
Uri frogLib = new Uri(scheme: 'file', path: frogLibDir); |
- Uri libraryRoot = frogLib.resolve('../leg/lib/'); |
+ Uri libraryRoot = frogLib.resolve('../../'); |
Map<String, SourceFile> sourceFiles = <SourceFile>{}; |
Future<String> provider(Uri uri) { |
@@ -98,3 +99,9 @@ class AbortLeg { |
AbortLeg(this.message); |
toString() => 'Aborted due to --throw-on-error: $message'; |
} |
+ |
+String getCurrentDirectory() { |
ahe
2012/03/26 21:39:33
Duplicated code. This file will go away when we fu
|
+ String dir = new File(".").fullPathSync(); |
+ if (dir.endsWith("/")) return dir; |
+ return "$dir/"; |
+} |