aboutsummaryrefslogtreecommitdiff
path: root/src/alf.c
diff options
context:
space:
mode:
authorB. Watson <urchlay@slackware.uk>2025-12-08 05:22:17 -0500
committerB. Watson <urchlay@slackware.uk>2025-12-08 05:22:17 -0500
commita9b8e2543787a3b174968645d607b9c067cc8049 (patch)
tree6f942aeba2afe3e6b433b567697d0a15ae758694 /src/alf.c
parent6dc74846a972f5263cd9b5553d19d88237872e6b (diff)
downloadalftools-a9b8e2543787a3b174968645d607b9c067cc8049.tar.gz
alf -vv: don't show total compression ratio if only compressing one file.
Diffstat (limited to 'src/alf.c')
-rw-r--r--src/alf.c10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/alf.c b/src/alf.c
index a19487c..fe9c342 100644
--- a/src/alf.c
+++ b/src/alf.c
@@ -354,10 +354,12 @@ int main(int argc, char **argv) {
if(out_file) fclose(out_file);
if(opt_verbose > 1) {
- printf("Compressed %d file%s: ", file_count, file_count == 1 ? "" : "s");
- printf("%u/%u (%d%%)\n",
- total_in, total_out,
- percent(total_out, total_in));
+ if(file_count > 1) {
+ printf("Compressed %d file%s: ", file_count, file_count == 1 ? "" : "s");
+ printf("%u/%u (%d%%)\n",
+ total_in, total_out,
+ percent(total_out, total_in));
+ }
print_elapsed_time();
if(backup_msg) {
printf("Backed up old '%s' to '%s~'.\n", out_filename, out_filename);