mirror of
https://github.com/MaskRay/ccls.git
synced 2025-01-31 18:00:26 +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);
|
_NSGetExecutablePath(nullptr, &size);
|
||||||
char* buffer = new char[size];
|
char* buffer = new char[size];
|
||||||
_NSGetExecutablePath(buffer, &size);
|
_NSGetExecutablePath(buffer, &size);
|
||||||
std::string result(buffer);
|
char* resolved = realpath(buffer, nullptr);
|
||||||
|
std::string result(resolved);
|
||||||
delete[] buffer;
|
delete[] buffer;
|
||||||
|
free(resolved);
|
||||||
return result;
|
return result;
|
||||||
#elif defined(__FreeBSD__)
|
#elif defined(__FreeBSD__)
|
||||||
static const int name[] = {
|
static const int name[] = {
|
||||||
|
Loading…
Reference in New Issue
Block a user