This commit is contained in:
parent
63bae46422
commit
47ec307f7b
2 changed files with 19 additions and 16 deletions
|
@ -51,7 +51,9 @@ async fn launch() -> _ {
|
|||
..Default::default()
|
||||
})
|
||||
.mount_assets()
|
||||
.mount("/", routes![
|
||||
.mount(
|
||||
"/",
|
||||
routes![
|
||||
routes::index_page,
|
||||
routes::pkg_route,
|
||||
routes::push::upload_pkg,
|
||||
|
@ -64,7 +66,8 @@ async fn launch() -> _ {
|
|||
routes::user::end_session,
|
||||
routes::user::change_password,
|
||||
routes::user::change_password_post
|
||||
])
|
||||
],
|
||||
)
|
||||
.manage(config)
|
||||
.manage(shell)
|
||||
}
|
||||
|
|
|
@ -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> {
|
||||
let output = Command::new("tar")
|
||||
.arg("-xO") // Extract to stdout (-O)
|
||||
.arg("-xOJ") // Extract to stdout (-O)
|
||||
.arg("-f")
|
||||
.arg(tar)
|
||||
.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> {
|
||||
let mut output = Command::new("tar")
|
||||
.arg("-xO") // Extract to stdout (-O)
|
||||
.arg("-xOJ") // Extract to stdout (-O)
|
||||
.arg("-f")
|
||||
.arg("-") // Indicate that the file input comes from stdin
|
||||
.arg(file_path)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue