mirror of
https://github.com/kiwix/libkiwix.git
synced 2026-10-26 02:49:20 -04:00
This commit is contained in:
1 parent
faff227365
commit
4b545b8ae2
2 files changed
+13
No files matched your search
@@ -125,3 +125,14 @@ bool copyFile(const string &sourcePath, const string &destPath) {
|
||||
|
||||
return true;
|
||||
}
|
||||
|
||||
string getExecutablePath() {
|
||||
char binRootPath[PATH_MAX];
|
||||
|
||||
#ifdef _WIN32
|
||||
#else
|
||||
readlink("/proc/self/exe", binRootPath, PATH_MAX);
|
||||
#endif
|
||||
|
||||
return std::string(binRootPath);
|
||||
}
|
||||
Reference in new issue
Block a user