From 9785badf09fe499a4341c5505b5a637313fbb685 Mon Sep 17 00:00:00 2001 From: luca castagnini Date: Wed, 4 Mar 2020 10:03:16 +0100 Subject: [PATCH] restore accidentally removed Linux #ifdef case --- src/core/support/Common.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/core/support/Common.cpp b/src/core/support/Common.cpp index 7d2d033da..f31cde146 100644 --- a/src/core/support/Common.cpp +++ b/src/core/support/Common.cpp @@ -150,7 +150,10 @@ namespace musik { namespace core { boost::filesystem::path command = boost::filesystem::system_complete(argv[0]); realpath(command.c_str(), pathbuf); delete[] argv; - #endif + #else + std::string pathToProc = u8fmt("/proc/%d/exe", (int) getpid()); + readlink(pathToProc.c_str(), pathbuf, PATH_MAX); + #endif result.assign(pathbuf); size_t last = result.find_last_of("/");