mirror of
https://github.com/arabine/open-story-teller.git
synced 2025-12-06 17:09:06 +01:00
fix regression
This commit is contained in:
parent
afa6846041
commit
830fa5fbfc
1 changed files with 13 additions and 12 deletions
|
|
@ -207,6 +207,19 @@ std::string getExecutablePath()
|
|||
#include <linux/limits.h> // PATH_MAX
|
||||
|
||||
|
||||
namespace pf
|
||||
{
|
||||
std::string getExecutablePath()
|
||||
{
|
||||
char result[PATH_MAX];
|
||||
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
|
||||
const char *path;
|
||||
if (count != -1) {
|
||||
path = dirname(result);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
}
|
||||
|
||||
static void throwOnRelative(const char *envName, const char *envValue)
|
||||
{
|
||||
|
|
@ -271,18 +284,6 @@ namespace pf
|
|||
}
|
||||
#endif
|
||||
|
||||
|
||||
std::string getExecutablePath()
|
||||
{
|
||||
char result[PATH_MAX];
|
||||
ssize_t count = readlink("/proc/self/exe", result, PATH_MAX);
|
||||
const char *path;
|
||||
if (count != -1) {
|
||||
path = dirname(result);
|
||||
}
|
||||
return path;
|
||||
}
|
||||
|
||||
std::string getDataHome()
|
||||
{
|
||||
#ifdef _WIN32
|
||||
|
|
|
|||
Loading…
Reference in a new issue