🚑️ fix
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-03-29 19:07:30 +01:00
parent b51ba8deaf
commit b721c21d9f
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 11 additions and 3 deletions

View file

@ -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()?;

View file

@ -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())