Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(484)

Unified Diff: runtime/bin/directory_win.cc

Issue 13896034: Add the ability to change the working directory (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Fixed tests Created 7 years, 8 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/bin/directory_patch.dart ('k') | samples/build_dart/build.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
« no previous file with comments | « runtime/bin/directory_patch.dart ('k') | samples/build_dart/build.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698