diff options
Diffstat (limited to 'adb/get_my_path_darwin.c')
-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); } |