-
Notifications
You must be signed in to change notification settings - Fork 86
Closed
Labels
bugfaulty or wrong behaviour of codefaulty or wrong behaviour of codegood first issueassumes no knowledge over the libraryassumes no knowledge over the library
Description
Platform
- SeqAn version: master from around December
- Operating system: RHEL 7
- Compiler: gcc10.2
Description
How to repeat the problem
parser.add_positional_option(p1, "FOO", seqan3::input_file_validator{{"foo.bar"}});This code is accepted and nothing in the documentation suggests that this doesn't work. But when I pass a file called X.foo.bar to the program, the argument parser throws and says
... the following valid extensions: [foo.bar]. Got ".bar" instead!"
I know that we have special treatment for files now (which is nice but might be better served by a different validator), but having an extension with a dot is quite common, even independent of compression.
Expected behaviour
This should work.
Actual behaviour
It doesn't.
Possible fix
This should be quite simple. Just check if the path ends_with the respective string instead of calling .extension().
Metadata
Metadata
Assignees
Labels
bugfaulty or wrong behaviour of codefaulty or wrong behaviour of codegood first issueassumes no knowledge over the libraryassumes no knowledge over the library