[IMPROVEMENT] Don't add files with empty filename & show better msg for multiple input files.#994
Conversation
|
CCExtractor CI platform finished running the test files on linux. Below is a summary of the test results:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Your PR breaks these cases:
Check the result page for more info. |
| { | ||
| case -1*ENOENT: | ||
| fatal(EXIT_NO_INPUT_FILES, "Failed to open input file: File does not exist."); | ||
| fatal(EXIT_NO_INPUT_FILES, "Failed to open one or more input file(s): File does not exist."); |
There was a problem hiding this comment.
Is this accurate? It doesn't seem possible that we can fail to open more than once since we are fatal()'ing on the first failure.
There was a problem hiding this comment.
You're right, I am sorry. Updated to Failed to open one of the input file(s): File does not exist.
| mprint("Files (%d): ", ctx->num_input_files); | ||
| for (int i=0;i<ctx->num_input_files;i++) | ||
| mprint ("%s%s",ctx->inputfile[i],i==(ctx->num_input_files-1)?"":","); | ||
| mprint ("%s%s",ctx->inputfile[i],i==(ctx->num_input_files-1)?"":", "); |
There was a problem hiding this comment.
This seems more debug that general, maybe mprint() is too much?
There was a problem hiding this comment.
What would you suggest? :)
There was a problem hiding this comment.
What do we use for debug messages? :-)
There was a problem hiding this comment.
@cfsmp3 I changed this (https://github.com/CCExtractor/ccextractor/pull/994/files#diff-20a92dffa6342caa6a83fd990812e4cbR14) to debug message. Should I change the current line (L16) as well? It was already in mprint though, and I think having the ability to see the files being processed is fine without running it in debug mode.
|
CCExtractor CI platform finished running the test files on windows. Below is a summary of the test results:
It seems that not all tests were passed completely. This is an indication that the output of some files is not as expected (but might be according to you). Your PR breaks these cases:
Check the result page for more info. |
22b74e1 to
71ce5b9
Compare
|
@saurabhshri Ping. |
|
@thealphadollar @cfsmp3 recommended a change in the PR. I am waiting for his reply! :) |
|
@saurabhshri don't use mprint :-) If you want to write debug messages, use dbg_print instead. |
71ce5b9 to
2dc5f4d
Compare
|
@cfsmp3 Oh, I misunderstood earlier! Done. :) |
|
@cfsmp3 can we merge this? |
In raising this pull request, I confirm the following (please check boxes):
My familiarity with the project is as follows (check one):
If CCExtractor is passed an empty argument, it tries to open it as a file. E.g.
ccextractor ""ORccextractor {file1} "" {file2}In case of multiple input files, if one or more failed to open, CCExtractor exists with the message
Failed to open input file: File does not exist.Since my second parameter was an empty filename""(came from an empty key in a script), I kept on thinking somehow "," is being appended to filename.It showed :
Input: filename,.With this PR: