Index: runtime/bin/directory_win.cc |
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc |
index dc6cd699b6855fe2bf26141912ab40f69748ba99..f0f9f9351eeca93a58ce917eca7631504fd47bc2 100644 |
--- a/runtime/bin/directory_win.cc |
+++ b/runtime/bin/directory_win.cc |
@@ -425,6 +425,14 @@ char* Directory::Current() { |
} |
+bool Directory::SetCurrent(const char* path) { |
+ const wchar_t* system_path = StringUtils::Utf8ToWide(path); |
+ bool result = SetCurrentDirectoryW(system_path) != 0; |
+ free(const_cast<wchar_t*>(system_path)); |
+ return result; |
+} |
+ |
+ |
bool Directory::Create(const char* dir_name) { |
const wchar_t* system_name = StringUtils::Utf8ToWide(dir_name); |
int create_status = CreateDirectoryW(system_name, NULL); |