Index: runtime/bin/directory_win.cc |
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc |
index 95e68a7fc187a370974731a994df8e8d56975ebb..1faea98d59d3b30fa97245e3f4c70d1e4da55bae 100644 |
--- a/runtime/bin/directory_win.cc |
+++ b/runtime/bin/directory_win.cc |
@@ -324,6 +324,15 @@ Directory::ExistsResult Directory::Exists(const char* dir_name) { |
} |
+char* Directory::Current() { |
+ char* result; |
+ int length = GetCurrentDirectory(0, NULL); |
+ result = reinterpret_cast<char*>(malloc(length + 1)); |
+ GetCurrentDirectory(length + 1, result); |
+ return result; |
+} |
+ |
+ |
bool Directory::Create(const char* dir_name) { |
return (CreateDirectory(dir_name, NULL) != 0); |
} |