From f19cfafeccaafbfaab886e338c3d572894ada3a2 Mon Sep 17 00:00:00 2001 From: stack72 Date: Thu, 17 Aug 2023 19:48:19 +0300 Subject: [PATCH] fix(si): Ensure that the entire SI data directory path exists or create it Fixes: #2626 --- lib/si-cli/src/key_management.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/si-cli/src/key_management.rs b/lib/si-cli/src/key_management.rs index 0a3a460771..ead0d4ba6f 100644 --- a/lib/si-cli/src/key_management.rs +++ b/lib/si-cli/src/key_management.rs @@ -134,7 +134,7 @@ pub async fn get_si_data_dir() -> Result { let si_data_dir = base_dirs.data_dir().join("SI"); let si_dir_exists = si_data_dir.as_path().is_dir(); if !si_dir_exists { - fs::create_dir(si_data_dir.as_path())?; + fs::create_dir_all(si_data_dir.as_path())?; } return Ok(si_data_dir); }