Index: runtime/bin/directory.cc |
diff --git a/runtime/bin/directory.cc b/runtime/bin/directory.cc |
index a9b2331e5bd0bec12017e40836e426cd0ada1cc5..ccf5918f352c8dedf271e30446cd74e45213809a 100644 |
--- a/runtime/bin/directory.cc |
+++ b/runtime/bin/directory.cc |
@@ -14,6 +14,8 @@ |
namespace dart { |
namespace bin { |
+char* Directory::system_temp_path_override_ = NULL; |
+ |
void FUNCTION_NAME(Directory_Current)(Dart_NativeArguments args) { |
const char* current = Directory::Current(); |
if (current != NULL) { |
@@ -187,6 +189,17 @@ void FUNCTION_NAME(Directory_SetAsyncDirectoryListerPointer)( |
} |
+void Directory::SetSystemTemp(const char* path) { |
+ if (system_temp_path_override_ != NULL) { |
+ free(system_temp_path_override_); |
+ system_temp_path_override_ = NULL; |
+ } |
+ if (path != NULL) { |
+ system_temp_path_override_ = strdup(path); |
+ } |
+} |
+ |
+ |
CObject* Directory::CreateRequest(const CObjectArray& request) { |
if ((request.Length() == 1) && request[0]->IsString()) { |
CObjectString path(request[0]); |