diff options
| author | 魏曹先生 <1992414357@qq.com> | 2026-06-18 21:06:09 +0800 |
|---|---|---|
| committer | 魏曹先生 <1992414357@qq.com> | 2026-06-18 21:06:09 +0800 |
| commit | e078163c7cdbbf226c18d3e3afa7268a2878e18b (patch) | |
| tree | b4ef7650b71f47691d3d03882f8f6bc4b0438817 | |
| parent | 68daa10abfe3015beca966825d32cf67c9f5d5d7 (diff) | |
fix(bucket): correct argument passed to create_dirs
| -rw-r--r-- | rola-bucket/src/bucket/init.rs | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/rola-bucket/src/bucket/init.rs b/rola-bucket/src/bucket/init.rs index 2733a37..30bf0f4 100644 --- a/rola-bucket/src/bucket/init.rs +++ b/rola-bucket/src/bucket/init.rs @@ -20,7 +20,7 @@ pub(crate) async fn init_bucket_at(path: PathBuf) -> Result<(), SpaceError> { } write_config(&bucket_config_file).await?; - create_dirs(&bucket_config_file).await?; + create_dirs(&path).await?; Ok(()) } @@ -31,7 +31,7 @@ async fn write_config(bucket_config_file: &Path) -> Result<(), SpaceError> { .map_err(SpaceError::Io) } -async fn create_dirs(bucket_config_file: &Path) -> Result<(), SpaceError> { +async fn create_dirs(bucket_dir: &Path) -> Result<(), SpaceError> { let dirs = [ DIR_BUCKET_OBJ, DIR_BUCKET_COMPRESSED_OBJ, @@ -41,7 +41,7 @@ async fn create_dirs(bucket_config_file: &Path) -> Result<(), SpaceError> { ]; for dir in dirs { - let full_path = bucket_config_file.join(dir); + let full_path = bucket_dir.join(dir); fs::create_dir_all(&full_path) .await .map_err(SpaceError::Io)?; |
