Index: runtime/bin/platform_macos.cc |
diff --git a/runtime/bin/platform_macos.cc b/runtime/bin/platform_macos.cc |
index 702bf017806e811b78243ca729276b7c8cdc8872..db874b90bff308e6cfe6f1473de82a145f1aa476 100644 |
--- a/runtime/bin/platform_macos.cc |
+++ b/runtime/bin/platform_macos.cc |
@@ -7,6 +7,7 @@ |
#include <mach-o/dyld.h> |
+#include "bin/file.h" |
#include "bin/platform.h" |
#include <crt_externs.h> // NOLINT |
@@ -91,7 +92,10 @@ char* Platform::ResolveExecutablePath() { |
free(path); |
return NULL; |
} |
- return path; |
+ // Return the canonnical path as the returned path might contain sym-links. |
kustermann
2015/06/09 10:49:47
sym-links -> symlinks
canonnical -> canonical
|
+ char* canon_path = File::GetCanonicalPath(path); |
+ free(path); |
+ return canon_path; |
} |
} // namespace bin |