static sd_json_format_flags_t arg_json_format_flags = SD_JSON_FORMAT_OFF;
static ImageClass arg_image_class = _IMAGE_CLASS_INVALID;
-#define PROGRESS_PREFIX "Total: "
+#define PROGRESS_PREFIX "Total:"
static int settle_image_class(void) {
p->copy_blocks_done += n_bytes;
- if (asprintf(&s, "%s %s %s %s/%s ",
+ if (asprintf(&s, "%s %s %s %s/%s",
strna(p->copy_blocks_path),
special_glyph(SPECIAL_GLYPH_ARROW_RIGHT),
strna(p->definition_path),
setvbuf(stderr, buffer, _IOFBF, sizeof(buffer));
fputc('\r', stderr);
- if (prefix)
+ if (prefix) {
fputs(prefix, stderr);
+ fputc(' ', stderr);
+ }
if (!terminal_is_dumb()) {
size_t cols = columns();
- size_t prefix_width = utf8_console_width(prefix);
+ size_t prefix_width = utf8_console_width(prefix) + 1 /* space */;
size_t length = cols > prefix_width + 6 ? cols - prefix_width - 6 : 0;
if (length > 5 && percentage >= 0.0 && percentage <= 100.0) {
if (terminal_is_dumb())
fputs(strrepa(" ",
- prefix ? utf8_console_width(prefix) + 4 :
- LESS_BY(columns(), 1U)), /* 4: %3.0f%% */
+ prefix ? utf8_console_width(prefix) + 5 : /* %3.0f%% (4 chars) + space */
+ LESS_BY(columns(), 1U)),
stderr);
else
fputs(ANSI_ERASE_TO_END_OF_LINE, stderr);