restore accidentally removed Linux #ifdef case

This commit is contained in:
luca castagnini 2020-03-04 10:03:16 +01:00
parent 209545a360
commit 9785badf09

View File

@ -150,6 +150,9 @@ namespace musik { namespace core {
boost::filesystem::path command = boost::filesystem::system_complete(argv[0]); boost::filesystem::path command = boost::filesystem::system_complete(argv[0]);
realpath(command.c_str(), pathbuf); realpath(command.c_str(), pathbuf);
delete[] argv; delete[] argv;
#else
std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid());
readlink(pathToProc.c_str(), pathbuf, PATH_MAX);
#endif #endif
result.assign(pathbuf); result.assign(pathbuf);