🩹 fix tar
All checks were successful
ci/woodpecker/push/build Pipeline was successful

This commit is contained in:
JMARyA 2025-03-29 17:56:21 +01:00
parent 63bae46422
commit 47ec307f7b
Signed by: jmarya
GPG key ID: 901B2ADDF27C2263
2 changed files with 19 additions and 16 deletions

View file

@ -51,20 +51,23 @@ async fn launch() -> _ {
..Default::default() ..Default::default()
}) })
.mount_assets() .mount_assets()
.mount("/", routes![ .mount(
routes::index_page, "/",
routes::pkg_route, routes![
routes::push::upload_pkg, routes::index_page,
routes::user::login, routes::pkg_route,
routes::user::login_post, routes::push::upload_pkg,
routes::user::account_page, routes::user::login,
routes::ui::pkg_ui, routes::user::login_post,
routes::ui::repo_ui, routes::user::account_page,
routes::user::new_api_key, routes::ui::pkg_ui,
routes::user::end_session, routes::ui::repo_ui,
routes::user::change_password, routes::user::new_api_key,
routes::user::change_password_post routes::user::end_session,
]) routes::user::change_password,
routes::user::change_password_post
],
)
.manage(config) .manage(config)
.manage(shell) .manage(shell)
} }

View file

@ -527,7 +527,7 @@ pub fn repo_add(db_file: &str, pkg_file: &str) {
pub fn read_file_tar(tar: &Path, file_path: &str) -> Option<String> { pub fn read_file_tar(tar: &Path, file_path: &str) -> Option<String> {
let output = Command::new("tar") let output = Command::new("tar")
.arg("-xO") // Extract to stdout (-O) .arg("-xOJ") // Extract to stdout (-O)
.arg("-f") .arg("-f")
.arg(tar) .arg(tar)
.arg(file_path) .arg(file_path)
@ -543,7 +543,7 @@ pub fn read_file_tar(tar: &Path, file_path: &str) -> Option<String> {
pub fn read_file_tar_raw(tar_data: &[u8], file_path: &str) -> Option<String> { pub fn read_file_tar_raw(tar_data: &[u8], file_path: &str) -> Option<String> {
let mut output = Command::new("tar") let mut output = Command::new("tar")
.arg("-xO") // Extract to stdout (-O) .arg("-xOJ") // Extract to stdout (-O)
.arg("-f") .arg("-f")
.arg("-") // Indicate that the file input comes from stdin .arg("-") // Indicate that the file input comes from stdin
.arg(file_path) .arg(file_path)