1
1
mirror of https://github.com/mawww/kakoune.git synced 2024-12-26 21:22:00 +03:00

fix runtime directory detection on MacOS

This commit is contained in:
Maxime Coste 2012-06-05 14:23:47 +00:00
parent 61bd77d529
commit 02051bb067

View File

@ -607,6 +607,9 @@ void exec_commands_in_runtime_file(const CommandParameters& params,
#elif defined(__APPLE__) #elif defined(__APPLE__)
uint32_t bufsize = 2048 - filename.length(); uint32_t bufsize = 2048 - filename.length();
_NSGetExecutablePath(buffer, &bufsize); _NSGetExecutablePath(buffer, &bufsize);
char* canonical_path = realpath(buffer, NULL);
strncpy(buffer, canonical_path, 2048 - filename.length());
free(canonical_path);
#else #else
# error "finding executable path is not implemented on this platform" # error "finding executable path is not implemented on this platform"
#endif #endif