mirror of
https://github.com/fastfetch-cli/fastfetch.git
synced 2026-09-13 02:42:09 +02:00
Packages: fix scoop detection when it's not installed
This commit is contained in:
@@ -36,6 +36,10 @@ void ffDetectPackages(FFinstance* instance, FFPackageCounts* counts)
|
||||
|
||||
FFstrbuf scoopPath;
|
||||
ffStrbufInitF(&scoopPath, "%s/scoop/apps/*", getenv("USERPROFILE"));
|
||||
counts->scoop = getNumElements(scoopPath.chars, FILE_ATTRIBUTE_DIRECTORY) - 3; // . .. scoop
|
||||
counts->scoop = getNumElements(scoopPath.chars, FILE_ATTRIBUTE_DIRECTORY);
|
||||
if(counts->scoop >= 3)
|
||||
counts->scoop -= 3; // . .. scoop
|
||||
else
|
||||
counts->scoop = 0;
|
||||
ffStrbufDestroy(&scoopPath);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user