summaryrefslogtreecommitdiffstats
path: root/fastboot
diff options
context:
space:
mode:
authorElliott Hughes <enh@google.com>2014-11-20 18:43:12 +0000
committerAndroid Git Automerger <android-git-automerger@android.com>2014-11-20 18:43:12 +0000
commit4c2aec09cf2da437f3995ff4cac87e4c20d1d4b0 (patch)
tree5b04fb0f9d5678af44bfa09d3068e24fd0595baa /fastboot
parent1bc314d3dda8a2e34d48c3811c0b29b9135f9051 (diff)
parentaa3e17e1b685218cddeb7a05e68ff1721a322147 (diff)
downloadsystem_core-4c2aec09cf2da437f3995ff4cac87e4c20d1d4b0.zip
system_core-4c2aec09cf2da437f3995ff4cac87e4c20d1d4b0.tar.gz
system_core-4c2aec09cf2da437f3995ff4cac87e4c20d1d4b0.tar.bz2
am aa3e17e1: Merge "Return path including executable instead of without"
* commit 'aa3e17e1b685218cddeb7a05e68ff1721a322147': Return path including executable instead of without
Diffstat (limited to 'fastboot')
-rw-r--r--fastboot/util_osx.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/fastboot/util_osx.c b/fastboot/util_osx.c
index e80a8f3..a8f5c31 100644
--- a/fastboot/util_osx.c
+++ b/fastboot/util_osx.c
@@ -32,12 +32,12 @@
void get_my_path(char s[PATH_MAX])
{
CFBundleRef mainBundle = CFBundleGetMainBundle();
- CFURLRef bundleURL = CFBundleCopyBundleURL(mainBundle);
- CFStringRef bundlePathString = CFURLCopyFileSystemPath(bundleURL, kCFURLPOSIXPathStyle);
- CFRelease(bundleURL);
+ CFURLRef executableURL = CFBundleCopyExecutableURL(mainBundle);
+ CFStringRef executablePathString = CFURLCopyFileSystemPath(executableURL, kCFURLPOSIXPathStyle);
+ CFRelease(executableURL);
- CFStringGetCString(bundlePathString, s, PATH_MAX - 1, kCFStringEncodingASCII);
- CFRelease(bundlePathString);
+ CFStringGetCString(executablePathString, s, PATH_MAX-1, kCFStringEncodingASCII);
+ CFRelease(executablePathString);
char *x;
x = strrchr(s, '/');