This commit is contained in:
parent
b51ba8deaf
commit
b721c21d9f
2 changed files with 11 additions and 3 deletions
|
@ -561,7 +561,8 @@ pub fn read_file_tar_raw(
|
|||
.arg("-f")
|
||||
.arg("-") // Indicate that the file input comes from stdin
|
||||
.arg(file_path)
|
||||
.stdin(Stdio::piped()) // Open a pipe to provide the tar data
|
||||
.stdin(Stdio::piped())
|
||||
.stdout(Stdio::piped())
|
||||
.spawn()
|
||||
.ok()?;
|
||||
|
||||
|
|
|
@ -48,7 +48,14 @@ pub async fn upload_pkg(
|
|||
return Err(api_error("This repository is a mirror."));
|
||||
}
|
||||
|
||||
let (_, _, _, _, compression) = Package::extract_pkg_name(upload.pkg.name().unwrap())
|
||||
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;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue