Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[utils] check for input file extension #346

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

rohanpsingh
Copy link
Contributor

Throw error if argv[1] does not have a .bin extension

@rohanpsingh rohanpsingh changed the title [utils][mc_bin_to_log] check for input file extension [utils] check for input file extension Feb 12, 2023
@gergondet
Copy link
Member

That's not super necessary, the FlatLog class checks that the log file is a valid mc_rtc log by checking for a magic number at the start of the file. What was the motivation for this?

@rohanpsingh
Copy link
Contributor Author

rohanpsingh commented Feb 13, 2023

In that case we could probably put the check early on. Currently, even if the input file is invalid, the program will generate an empty output file and then fail after.
I agree it's not super important.

@gergondet
Copy link
Member

I see, I think the nicer approach is to:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants