mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-19 03:55:49 +00:00
Let GetExecutablePath()
return real path on osx. (#325)
This commit is contained in:
parent
b5c9e22ad1
commit
619ad11f9e
@ -125,8 +125,10 @@ std::string GetExecutablePath() {
|
||||
_NSGetExecutablePath(nullptr, &size);
|
||||
char* buffer = new char[size];
|
||||
_NSGetExecutablePath(buffer, &size);
|
||||
std::string result(buffer);
|
||||
char* resolved = realpath(buffer, nullptr);
|
||||
std::string result(resolved);
|
||||
delete[] buffer;
|
||||
free(resolved);
|
||||
return result;
|
||||
#elif defined(__FreeBSD__)
|
||||
static const int name[] = {
|
||||
|
Loading…
Reference in New Issue
Block a user