diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-03-07 21:49:29 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-03-07 21:49:29 +0800 |
| commit | f5133df198050b82dbdf19a4b2b09c4c27ea07b0 (patch) | |
| tree | cc4e489ce4468f00d0c29321b96989e63d10b1b9 /src/chunker/rw/storage/write/simple.rs | |
| parent | 846dd60ef3f167b60f5472493f30a6705de692d5 (diff) | |
Rename subcommands and constants for clarity
Diffstat (limited to 'src/chunker/rw/storage/write/simple.rs')
| -rw-r--r-- | src/chunker/rw/storage/write/simple.rs | 16 |
1 files changed, 10 insertions, 6 deletions
diff --git a/src/chunker/rw/storage/write/simple.rs b/src/chunker/rw/storage/write/simple.rs index 38aecfc..461afff 100644 --- a/src/chunker/rw/storage/write/simple.rs +++ b/src/chunker/rw/storage/write/simple.rs @@ -87,16 +87,20 @@ async fn write_file_to_storage( trace!("file_size={}", raw_data.len()); trace!("output_index_file={}", output_index_file.display()); trace!("policy_name={:?}", ctx.policy_name); - trace!("storage_dir={}", ctx.output_dir.display()); + trace!( + "storage_dir={}", + ctx.storage_path.as_ref().unwrap().display() + ); info!( "{} chunks will be written to {}", chunk_count, - ctx.output_dir.display() + ctx.storage_path.as_ref().unwrap().display() ); - tokio::fs::create_dir_all(&ctx.output_dir).await?; - trace!("Output directory created or already exists"); + let storage_dir = ctx.storage_path.as_ref().unwrap().clone(); + tokio::fs::create_dir_all(&storage_dir).await?; + trace!("Storage directory created or already exists"); let mut tasks = Vec::new(); let mut start = 0; @@ -119,7 +123,7 @@ async fn write_file_to_storage( progress_name: progress_name.clone(), step, chunk_data: chunk_data.to_vec(), - output_dir: ctx.output_dir.clone(), + output_dir: ctx.storage_path.as_ref().unwrap().clone(), chunk_hash: ctx.chunk_hash, chunk_index, }; @@ -149,7 +153,7 @@ async fn write_file_to_storage( progress_name: progress_name.clone(), step, chunk_data: chunk_data.to_vec(), - output_dir: ctx.output_dir.clone(), + output_dir: ctx.storage_path.as_ref().unwrap().clone(), chunk_hash: ctx.chunk_hash, chunk_index, }; |
