mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-10-30 09:33:39 +01:00
Packages (Linux): fix snap package number detection on systems other than Ubuntu
Fixes 562
This commit is contained in:
@@ -197,6 +197,9 @@ static uint32_t getSnap(FFstrbuf* baseDir)
|
||||
{
|
||||
uint32_t result = getNumElements(baseDir, "/snap", DT_DIR);
|
||||
|
||||
if (result == 0)
|
||||
result = getNumElements(baseDir, "/var/lib/snapd/snap", DT_DIR);
|
||||
|
||||
//Accounting for the /snap/bin folder
|
||||
return result > 0 ? result - 1 : 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user