This commit is contained in:
Mars 2025-05-05 12:54:03 -04:00
parent ccd20f5461
commit 8709ef9de9
Signed by: pupbrained
GPG key ID: 874E22DF2F9DFCB5
4 changed files with 330 additions and 203 deletions

View file

@ -295,15 +295,7 @@ namespace package {
if (cargoPath.empty() || !fs::exists(cargoPath))
return Err(DracError(DracErrorCode::NotFound, "Could not find cargo directory"));
u64 count = 0;
for (const fs::directory_entry& entry : fs::directory_iterator(cargoPath))
if (entry.is_regular_file())
++count;
debug_log("Found {} packages in cargo directory: {}", count, cargoPath.string());
return count;
return GetCountFromDirectory("cargo", cargoPath);
}
fn GetTotalCount() -> Result<u64> {