mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2025-02-20 11:43:27 +08:00
Packages (Linux): fix snap package number detection on systems other than Ubuntu
Fixes 562
This commit is contained in:
parent
576fcd7d3d
commit
5337e5cead
@ -29,6 +29,7 @@ Bugfixes:
|
||||
* Fix Termux Monet terminal version detection (Terminal)
|
||||
* Fix zpool volumes detection (Disk, Linux)
|
||||
* Fix external volumes detection (Disk, Linux)
|
||||
* Fix snap package number detection on systems other than Ubuntu (Packages, Linux)
|
||||
|
||||
Logo:
|
||||
* Add Afterglow
|
||||
|
@ -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;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user