diff options
| -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)?; |
