From e078163c7cdbbf226c18d3e3afa7268a2878e18b Mon Sep 17 00:00:00 2001 From: 魏曹先生 <1992414357@qq.com> Date: Thu, 18 Jun 2026 21:06:09 +0800 Subject: fix(bucket): correct argument passed to create_dirs --- rola-bucket/src/bucket/init.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'rola-bucket/src') 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)?; -- cgit