From 5e5186be07102c24b77ec25be473777de2c4e271 Mon Sep 17 00:00:00 2001 From: Michael Jumper Date: Fri, 26 Feb 2016 15:59:33 -0800 Subject: [PATCH] GUAC-236: Log failures vs. total files. --- src/guacenc/guacenc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/guacenc/guacenc.c b/src/guacenc/guacenc.c index 5fe057ac..c5b00efc 100644 --- a/src/guacenc/guacenc.c +++ b/src/guacenc/guacenc.c @@ -34,12 +34,13 @@ int main(int argc, char* argv[]) { "version " VERSION); /* Abort if no files given */ - if (argc == 1) { + if (argc <= 1) { guacenc_log(GUAC_LOG_INFO, "No input files specified. Nothing to do."); return 0; } /* Track number of overall failures */ + int total_files = argc - 1; int failures = 0; /* Encode all input files */ @@ -61,8 +62,8 @@ int main(int argc, char* argv[]) { /* Warn if at least one file failed */ if (failures != 0) - guacenc_log(GUAC_LOG_WARNING, "Encoding failed for %i file(s).", - failures); + guacenc_log(GUAC_LOG_WARNING, "Encoding failed for %i of %i file(s).", + failures, total_files); /* Notify of success */ else