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
Last component of output base names containing multiple periods is dropped #907
Comments
Thanks for reporting. I can reproduce this:
The result is: -rw-r--r-- 1 cr staff 3.1M Jun 29 14:21 basename.aligned.fasta As you report, |
@KatSteinke for now a workaround would be to add an extra ending that will get stripped. I'll try to get a fix out today @ivan-aksamentov |
Root cause:
|
Resolves: #907 This rolls an in-house version of `add_extension()` function which always adds an extension to a `PathBuf`. This is different from `PathBuf::with_extension()` which may replace or add extension depending on what the path is. This solves a problem with basenames containing dots, as described in the issue: `PathBuf::with_extension()` thought that they are extensions and replaced the last one. But we always want to add, not replace.
This was fixed in #913 and will be released in 2.0.1 in a few moments. |
Reasoning in https://github.com/nextstrain/nextclade/pull/1387/files#r1462588942 I tested with test case from #907 and various basenames and outputs are sensible. This refactor doesn't seem to change anything - at least I couldn't find a difference but it's good to be safe.
I've run into an issue when specifying an
output-basename
that contains multiple periods such as e.g.SAMPLENAME.very.long.basename
in Nextclade 2.0.0 - the last component of the name is consistently dropped, so result files are named e.g.SAMPLENAME.very.long.[result].[extension]
.For more detail: I'm running this with
output-all
,output-basename
,output-translations
andoutput-csv
specified; the latter two are absolute paths, and work without problems.The text was updated successfully, but these errors were encountered: