Prune implemented PROPERLY and in a way that WORKS

main
Michal 2 years ago
parent bcb070fe5b
commit 44627c25fc
No known key found for this signature in database
GPG Key ID: A6A1A4DCB22279B9

@ -47,7 +47,7 @@ pub fn prune(verbose: bool) {
let ext = parts.next().unwrap();
let package = PackageFile {
name: name.to_string(),
ver: ver.to_string() + "-" + &rel.to_string(),
ver: ver.to_string() + "-" + rel,
ext: ext.to_string(),
};
log!(verbose, "Package: {:?}", package);
@ -83,8 +83,8 @@ pub fn prune(verbose: bool) {
let mut packages_to_delete: Vec<PackageFile> = vec![];
for p in packages_by_name.iter() {
let mut to_delete = vec![];
for i in 0..p.len() {
if i >= 4 {
for (i, _) in p.iter().enumerate() {
if i >= 3 {
log!(verbose, "Deleting {:?}", p[i]);
to_delete.push(p[i].clone());
}

Loading…
Cancel
Save