Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
pkg-clean: Don't add into size failed additions
Bryan Drewery committed 11 years ago
commit e0a0dea3f48cb79097440fd2ac6d1b58c06c4352
parent 46e6fec
1 file changed +8 -4
modified src/clean.c
@@ -261,8 +261,10 @@ exec_clean(int argc, char **argv)

		if (all) {
			retcode = add_to_dellist(&dl, ent->fts_path);
-
			total += ent->fts_statp->st_size;
-
			++cnt;
+
			if (retcode == EPKG_OK) {
+
				total += ent->fts_statp->st_size;
+
				++cnt;
+
			}
			continue;
		}

@@ -295,8 +297,10 @@ exec_clean(int argc, char **argv)
			HASH_FIND_STR(sumlist, csum, s);
		if (s == NULL) {
			retcode = add_to_dellist(&dl, ent->fts_path);
-
			total += ent->fts_statp->st_size;
-
			++cnt;
+
			if (retcode == EPKG_OK) {
+
				total += ent->fts_statp->st_size;
+
				++cnt;
+
			}
			continue;
		}
	}