summaryrefslogtreecommitdiff
path: root/src/chunker/rw/storage/write/stream.rs
diff options
context:
space:
mode:
author魏曹先生 <1992414357@qq.com>2026-03-07 21:49:29 +0800
committer魏曹先生 <1992414357@qq.com>2026-03-07 21:49:29 +0800
commitf5133df198050b82dbdf19a4b2b09c4c27ea07b0 (patch)
treecc4e489ce4468f00d0c29321b96989e63d10b1b9 /src/chunker/rw/storage/write/stream.rs
parent846dd60ef3f167b60f5472493f30a6705de692d5 (diff)
Rename subcommands and constants for clarity
Diffstat (limited to 'src/chunker/rw/storage/write/stream.rs')
-rw-r--r--src/chunker/rw/storage/write/stream.rs6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/chunker/rw/storage/write/stream.rs b/src/chunker/rw/storage/write/stream.rs
index 092cee7..74a391b 100644
--- a/src/chunker/rw/storage/write/stream.rs
+++ b/src/chunker/rw/storage/write/stream.rs
@@ -42,7 +42,7 @@ pub async fn write_file_stream(
// Collect chunk information
let chunk_infos = Arc::new(Mutex::new(Vec::new()));
let chunk_counter = Arc::new(Mutex::new(0usize));
- let output_dir = ctx.output_dir.clone();
+ let storage_dir = ctx.storage_path.as_ref().unwrap().clone();
let chunk_hash = ctx.chunk_hash;
// If only displaying boundaries, use chunk_stream_display_boundaries
@@ -80,7 +80,7 @@ pub async fn write_file_stream(
stream_read_size,
path,
|chunk_data: Vec<u8>| {
- let output_dir = output_dir.clone();
+ let storage_dir = storage_dir.clone();
let chunk_hash = chunk_hash;
let progress_name = progress_name.clone();
let chunk_infos = Arc::clone(&chunk_infos);
@@ -97,7 +97,7 @@ pub async fn write_file_stream(
let hash_hex = hex::encode(hash_bytes);
// Build file path
- let file_path = get_chunk_path(&output_dir, &hash_hex);
+ let file_path = get_chunk_path(&storage_dir, &hash_hex);
// Create directory if needed
if let Some(parent_dir) = file_path.parent() {