mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
fixed WM::getFromProcDir
This commit is contained in:
@@ -165,6 +165,7 @@ static void getFromProcDir(FFWMDEResult* result, ProcData* procData, bool search
|
||||
ffStrbufAppendS(&procPath, procData->dirent->d_name);
|
||||
ffStrbufAppendS(&procPath, "/cmdline");
|
||||
ffGetFileContent(procPath.chars, &processName);
|
||||
ffStrbufRecalculateLength(&processName); //Arguments are seperated by a \0 char. We make use of this to extract only the executable path. This is needed if arguments contain the / char
|
||||
ffStrbufSubstrAfterLastC(&processName, '/');
|
||||
ffStrbufSubstrBefore(&procPath, procPathLength);
|
||||
|
||||
@@ -172,7 +173,7 @@ static void getFromProcDir(FFWMDEResult* result, ProcData* procData, bool search
|
||||
if(applyDEHintIfDE(&processName, &procData->deHint) && !searchWM)
|
||||
break;
|
||||
|
||||
//If we have a WM, dont overwrite it. Therefoore searchWM must be first in the condition
|
||||
//If we have a WM, dont overwrite it. Therefore searchWM must be first in the condition
|
||||
if(searchWM && applyPrettyNameIfWM(result, &processName, &procData->protocolHint))
|
||||
break;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user