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

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: 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
Index: runtime/bin/directory_win.cc
diff --git a/runtime/bin/directory_win.cc b/runtime/bin/directory_win.cc
index dc6cd699b6855fe2bf26141912ab40f69748ba99..2da3998b28e48cc9a33387ba42d25d73948616ec 100644
--- a/runtime/bin/directory_win.cc
+++ b/runtime/bin/directory_win.cc
@@ -425,6 +425,12 @@ char* Directory::Current() {
}
+bool Directory::SetCurrent(const char* path) {
+ const wchar_t* system_path = StringUtils::Utf8ToWide(path);
+ return SetCurrentDirectoryW(system_path) == 0;
Bill Hesse 2013/04/29 11:01:12 free system_path?
Søren Gjesse 2013/04/29 11:59:15 Absolutely, thanks
+}
+
+
bool Directory::Create(const char* dir_name) {
const wchar_t* system_name = StringUtils::Utf8ToWide(dir_name);
int create_status = CreateDirectoryW(system_name, NULL);

Powered by Google App Engine
This is Rietveld 408576698