fix: verify downloads and bound imported metadata
This commit is contained in:
1 parent
2b6750a971
commit
3149b96971
25 files changed
+678
-215
No files matched your search
@@ -4,23 +4,24 @@
|
||||
#[must_use]
|
||||
pub fn maven_coord_to_path(coord: &str) -> Option<String> {
|
||||
let parts: Vec<&str> = coord.split(':').collect();
|
||||
match parts.as_slice() {
|
||||
let path = match parts.as_slice() {
|
||||
[group, artifact, version] => {
|
||||
let group_path = group.replace('.', "/");
|
||||
Some(format!(
|
||||
format!(
|
||||
"{}/{}/{}/{}-{}.jar",
|
||||
group_path, artifact, version, artifact, version
|
||||
))
|
||||
)
|
||||
}
|
||||
[group, artifact, version, classifier] => {
|
||||
let group_path = group.replace('.', "/");
|
||||
Some(format!(
|
||||
format!(
|
||||
"{}/{}/{}/{}-{}-{}.jar",
|
||||
group_path, artifact, version, artifact, version, classifier
|
||||
))
|
||||
)
|
||||
}
|
||||
_ => None,
|
||||
}
|
||||
_ => return None,
|
||||
};
|
||||
crate::storage::safe_relative_path(std::path::Path::new(&path)).then_some(path)
|
||||
}
|
||||
|
||||
#[cfg(test)]
|
||||
|
||||
Reference in new issue
Block a user