|
|
@ -743,9 +743,10 @@ bool SetStartOnSystemStartup(bool fAutoStart) |
|
|
|
else |
|
|
|
else |
|
|
|
{ |
|
|
|
{ |
|
|
|
char pszExePath[MAX_PATH+1]; |
|
|
|
char pszExePath[MAX_PATH+1]; |
|
|
|
memset(pszExePath, 0, sizeof(pszExePath)); |
|
|
|
ssize_t r = readlink("/proc/self/exe", pszExePath, sizeof(pszExePath) - 1); |
|
|
|
if (readlink("/proc/self/exe", pszExePath, sizeof(pszExePath)-1) == -1) |
|
|
|
if (r == -1) |
|
|
|
return false; |
|
|
|
return false; |
|
|
|
|
|
|
|
pszExePath[r] = '\0'; |
|
|
|
|
|
|
|
|
|
|
|
fs::create_directories(GetAutostartDir()); |
|
|
|
fs::create_directories(GetAutostartDir()); |
|
|
|
|
|
|
|
|
|
|
|