| Index: runtime/bin/dartutils.cc
|
| diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
|
| index 4a9a247c3424830e13043ca8c32f81277e4a1753..55da17d932e4ede39bce949efdd62cf6d8b02c27 100644
|
| --- a/runtime/bin/dartutils.cc
|
| +++ b/runtime/bin/dartutils.cc
|
| @@ -933,6 +933,18 @@ bool DartUtils::SetOriginalWorkingDirectory() {
|
| }
|
|
|
|
|
| +Dart_Handle DartUtils::GetCanonicalizableWorkingDirectory() {
|
| + const char* str = DartUtils::original_working_directory;
|
| + intptr_t len = strlen(str);
|
| + if ((str[len] == '/') || (IsWindowsHost() && str[len] == '\\')) {
|
| + return Dart_NewStringFromCString(str);
|
| + }
|
| + char* new_str = reinterpret_cast<char*>(Dart_ScopeAllocate(len + 2));
|
| + snprintf(new_str, (len + 2), "%s%s", str, File::PathSeparator());
|
| + return Dart_NewStringFromCString(new_str);
|
| +}
|
| +
|
| +
|
| // Statically allocated Dart_CObject instances for immutable
|
| // objects. As these will be used by different threads the use of
|
| // these depends on the fact that the marking internally in the
|
|
|