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

Unified Diff: runtime/bin/platform_win.cc

Issue 1178643007: Resolve the executable path on Mac OS when sym-linked (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Addressed review comments Created 5 years, 6 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 | « no previous file | tests/standalone/io/platform_executable_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/platform_win.cc
diff --git a/runtime/bin/platform_win.cc b/runtime/bin/platform_win.cc
index afa924bab82e4cfa82eb7f5bfcd8cbc229281569..d109c82dda07cbddb8cca9596a8322fda756268f 100644
--- a/runtime/bin/platform_win.cc
+++ b/runtime/bin/platform_win.cc
@@ -5,6 +5,7 @@
#include "platform/globals.h"
#if defined(TARGET_OS_WINDOWS)
+#include "bin/file.h"
#include "bin/platform.h"
#include "bin/log.h"
#include "bin/socket.h"
@@ -97,7 +98,10 @@ char* Platform::ResolveExecutablePath() {
}
char* path = StringUtils::WideToUtf8(tmp_buffer);
free(tmp_buffer);
- return path;
+ // Return the canonical path as the returned path might contain symlinks.
+ char* canon_path = File::GetCanonicalPath(path);
+ free(path);
+ return canon_path;
}
} // namespace bin
« no previous file with comments | « no previous file | tests/standalone/io/platform_executable_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698