Radish alpha
H
rad:z3QDZAW2FAfuLvihrhiyDC9fAD8G9
HardenedBSD Package Manager
Radicle
Git
Revert "Align fetching progress bars"
Baptiste Daroussin committed 9 years ago
commit 1a6fd1f32f17479ca35dcde2e2899c4435d32516
parent 2a324ab
1 file changed +2 -10
modified src/event.c
@@ -477,10 +477,7 @@ draw_progressbar(int64_t current, int64_t total)

			humanize_number(buf, sizeof(buf),
			    current,"B", HN_AUTOSCALE, HN_IEC_PREFIXES);
-
			if (current < 1000)
-
				printf(" %*s  ", (int)sizeof(buf) - 2, buf);
-
			else
-
				printf(" %*s", (int)sizeof(buf), buf);
+
			printf(" %*s", (int)sizeof(buf), buf);

			if (bytes_left > 0)
				format_rate_SI(buf, sizeof(buf), transferred);
@@ -536,7 +533,6 @@ event_callback(void *data, struct pkg_event *ev)
	int *debug = data, i;
	struct pkg_event_conflict *cur_conflict;
	const char *filename, *reponame;
-
	char trunc_filename[42] = { 0 };

	if (msg_buf == NULL) {
		utstring_new(msg_buf);
@@ -596,13 +592,9 @@ event_callback(void *data, struct pkg_event *ev)
			 */
			filename = ev->e_fetching.url;
		}
-
		strncpy(trunc_filename, filename, 41);
-
		if (strnlen(filename,42) > 41)
-
			trunc_filename[40] = '*';
		job_status_begin(msg_buf);
		progress_debit = true;
-
		utstring_printf(msg_buf, "%-41s", trunc_filename);
-

+
		utstring_printf(msg_buf, "Fetching %s", filename);
		break;
	case PKG_EVENT_FETCH_FINISHED:
		progress_debit = false;