diff options
author | Matthias Beyer <mail@beyermatthias.de> | 2020-11-07 10:46:02 +0100 |
---|---|---|
committer | Matthias Beyer <mail@beyermatthias.de> | 2020-11-07 14:53:15 +0100 |
commit | 3a4edbf03acf79362d8a66986781bcaa9e8afb92 (patch) | |
tree | 5ff47a18798a2b9cacf7270d8d50c4de8503e069 /src/filestore | |
parent | 8be38e18978acca52736d8aab11d91419840b29f (diff) |
Fix: Parse artifact name and version from file stem
This fixes a bug where we considered the extension of the filename when
parsing the artifact name and version, which is clearly something we
shouldn't do, as the file extension is not part of the version at all!
;-)
Signed-off-by: Matthias Beyer <mail@beyermatthias.de>
Diffstat (limited to 'src/filestore')
-rw-r--r-- | src/filestore/artifact.rs | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/filestore/artifact.rs b/src/filestore/artifact.rs index 8fb1b5a..065f96a 100644 --- a/src/filestore/artifact.rs +++ b/src/filestore/artifact.rs @@ -62,7 +62,7 @@ impl Artifact { } fn parse_path(path: &Path) -> Result<(PackageName, PackageVersion)> { - path.file_name() + path.file_stem() .ok_or_else(|| anyhow!("Cannot get filename from {}", path.display()))? .to_owned() .into_string() |