| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 library builtin; | 5 library builtin; |
| 6 import 'dart:io'; | 6 import 'dart:io'; |
| 7 import 'dart:async'; | 7 import 'dart:async'; |
| 8 import 'dart:convert'; | 8 import 'dart:convert'; |
| 9 // import 'root_library'; happens here from C Code | 9 // import 'root_library'; happens here from C Code |
| 10 | 10 |
| (...skipping 195 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 206 } | 206 } |
| 207 if (cwd.length > 1 && cwd[1] == ':') { | 207 if (cwd.length > 1 && cwd[1] == ':') { |
| 208 return '/${cwd[0]}:'; | 208 return '/${cwd[0]}:'; |
| 209 } | 209 } |
| 210 return null; | 210 return null; |
| 211 } | 211 } |
| 212 | 212 |
| 213 | 213 |
| 214 void _setWorkingDirectory(cwd) { | 214 void _setWorkingDirectory(cwd) { |
| 215 _workingWindowsDrivePrefix = _extractDriveLetterPrefix(cwd); | 215 _workingWindowsDrivePrefix = _extractDriveLetterPrefix(cwd); |
| 216 cwd = _sanitizeWindowsPath(cwd); | |
| 217 cwd = _enforceTrailingSlash(cwd); | |
| 218 _workingDirectoryUri = new Uri.file(cwd); | 216 _workingDirectoryUri = new Uri.file(cwd); |
| 219 if (!_workingDirectoryUri.path.endsWith("/")) { | 217 if (!_workingDirectoryUri.path.endsWith("/")) { |
| 220 var directoryPath = _workingDirectoryUri.path + "/"; | 218 var directoryPath = _workingDirectoryUri.path + "/"; |
| 221 _workingDirectoryUri = _workingDirectoryUri.resolve(directoryPath); | 219 _workingDirectoryUri = _workingDirectoryUri.resolve(directoryPath); |
| 222 } | 220 } |
| 223 | 221 |
| 224 _logResolution('# Working Directory: $cwd'); | 222 _logResolution('# Working Directory: $cwd'); |
| 225 } | 223 } |
| 226 | 224 |
| 227 | 225 |
| (...skipping 226 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } else if (Platform.isWindows) { | 452 } else if (Platform.isWindows) { |
| 455 filename = '$name.dll'; | 453 filename = '$name.dll'; |
| 456 } else { | 454 } else { |
| 457 _logResolution( | 455 _logResolution( |
| 458 'Native extensions not supported on ${Platform.operatingSystem}'); | 456 'Native extensions not supported on ${Platform.operatingSystem}'); |
| 459 throw 'Native extensions not supported on ${Platform.operatingSystem}'; | 457 throw 'Native extensions not supported on ${Platform.operatingSystem}'; |
| 460 } | 458 } |
| 461 | 459 |
| 462 return [path, filename, name]; | 460 return [path, filename, name]; |
| 463 } | 461 } |
| OLD | NEW |