feat: auto-extract support

This commit is contained in:
weisd
2025-05-08 15:44:28 +08:00
parent 29ddf4dbc8
commit 76fdefeca4
8 changed files with 369 additions and 35 deletions
+1 -2
View File
@@ -9,7 +9,6 @@ use crate::{
};
use common::error::{Error, Result};
use tokio::fs;
use tracing::info;
use super::error::{os_err_to_file_err, os_is_exist, DiskError};
@@ -137,7 +136,7 @@ pub async fn reliable_rename(
) -> io::Result<()> {
if let Some(parent) = dst_file_path.as_ref().parent() {
if !file_exists(parent).await {
info!("reliable_rename reliable_mkdir_all parent: {:?}", parent);
// info!("reliable_rename reliable_mkdir_all parent: {:?}", parent);
reliable_mkdir_all(parent, base_dir.as_ref()).await?;
}
}
+3 -6
View File
@@ -421,7 +421,7 @@ impl SetDisks {
let file_path = file_path.clone();
async move {
if let Some(disk) = disk {
match disk
(disk
.delete(
bucket,
&file_path,
@@ -430,11 +430,8 @@ impl SetDisks {
..Default::default()
},
)
.await
{
Ok(_) => None,
Err(e) => Some(e),
}
.await)
.err()
} else {
Some(Error::new(DiskError::DiskNotFound))
}