mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Platform: fix exe path detection
This commit is contained in:
@@ -29,11 +29,13 @@ static void getExePath(FFPlatform* platform)
|
||||
(int[]){CTL_KERN, KERN_PROC, KERN_PROC_PATHNAME, (int) getpid()}, 4,
|
||||
exePath->chars, &exePathLen,
|
||||
NULL, 0
|
||||
))
|
||||
) < 0)
|
||||
exePathLen = 0;
|
||||
else
|
||||
exePathLen--; // remove terminating NUL
|
||||
#endif
|
||||
if (exePathLen > 0)
|
||||
exePath->length = (uint32_t) (exePathLen - 1);
|
||||
exePath->length = (uint32_t) exePathLen;
|
||||
}
|
||||
|
||||
static void platformPathAddEnv(FFlist* dirs, const char* env)
|
||||
|
||||
Reference in New Issue
Block a user