GUAC-236: Log failures vs. total files.

This commit is contained in:
Michael Jumper 2016-02-26 15:59:33 -08:00
parent 652ea5ddf9
commit 5e5186be07

View File

@ -34,12 +34,13 @@ int main(int argc, char* argv[]) {
"version " VERSION); "version " VERSION);
/* Abort if no files given */ /* Abort if no files given */
if (argc == 1) { if (argc <= 1) {
guacenc_log(GUAC_LOG_INFO, "No input files specified. Nothing to do."); guacenc_log(GUAC_LOG_INFO, "No input files specified. Nothing to do.");
return 0; return 0;
} }
/* Track number of overall failures */ /* Track number of overall failures */
int total_files = argc - 1;
int failures = 0; int failures = 0;
/* Encode all input files */ /* Encode all input files */
@ -61,8 +62,8 @@ int main(int argc, char* argv[]) {
/* Warn if at least one file failed */ /* Warn if at least one file failed */
if (failures != 0) if (failures != 0)
guacenc_log(GUAC_LOG_WARNING, "Encoding failed for %i file(s).", guacenc_log(GUAC_LOG_WARNING, "Encoding failed for %i of %i file(s).",
failures); failures, total_files);
/* Notify of success */ /* Notify of success */
else else