This commit is contained in:
parent
b51ba8deaf
commit
b721c21d9f
2 changed files with 11 additions and 3 deletions
|
@ -48,8 +48,15 @@ pub async fn upload_pkg(
|
|||
return Err(api_error("This repository is a mirror."));
|
||||
}
|
||||
|
||||
let (_, _, _, _, compression) = Package::extract_pkg_name(upload.pkg.name().unwrap())
|
||||
.ok_or_else(|| api_error("Package has weird filename"))?;
|
||||
let (_, _, _, _, compression) = Package::extract_pkg_name(
|
||||
upload
|
||||
.pkg
|
||||
.raw_name()
|
||||
.unwrap()
|
||||
.dangerous_unsafe_unsanitized_raw()
|
||||
.as_str(),
|
||||
)
|
||||
.ok_or_else(|| api_error("Package has weird filename"))?;
|
||||
|
||||
let pkg_file = tmp_file_to_vec(&upload.pkg).await;
|
||||
let content = read_file_tar_raw(&pkg_file, ".PKGINFO", compression.clone())
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue