diff options
author | Elliott Hughes <enh@google.com> | 2014-11-20 18:35:12 +0000 |
---|---|---|
committer | Gerrit Code Review <noreply-gerritcodereview@google.com> | 2014-11-20 18:35:12 +0000 |
commit | aa3e17e1b685218cddeb7a05e68ff1721a322147 (patch) | |
tree | 784e236c982cbe6aa72808ab0e5840e69fbde75d /adb | |
parent | 511849507a7b2f4e259f6763c62f0c8619977b06 (diff) | |
parent | 26b53bb75e6bdf9aa7820a3343845dae145625cc (diff) | |
download | system_core-aa3e17e1b685218cddeb7a05e68ff1721a322147.zip system_core-aa3e17e1b685218cddeb7a05e68ff1721a322147.tar.gz system_core-aa3e17e1b685218cddeb7a05e68ff1721a322147.tar.bz2 |
Merge "Return path including executable instead of without"
Diffstat (limited to 'adb')
-rw-r--r-- | adb/get_my_path_darwin.c | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/adb/get_my_path_darwin.c b/adb/get_my_path_darwin.c index 9141b57..65dd226 100644 --- a/adb/get_my_path_darwin.c +++ b/adb/get_my_path_darwin.c @@ -20,11 +20,11 @@ void get_my_path(char *s, size_t maxLen) { 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, maxLen, kCFStringEncodingASCII); - CFRelease(bundlePathString); + CFStringGetCString(executablePathString, s, maxLen, kCFStringEncodingASCII); + CFRelease(executablePathString); } |