From dd01bff07e029a12c98cf5aedfdce4d19f4f707c Mon Sep 17 00:00:00 2001 From: Mel Date: Sat, 2 Oct 2021 21:41:28 +0200 Subject: Re-add Ka repository directory creation to Create action. --- src/actions/create.rs | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'src/actions') diff --git a/src/actions/create.rs b/src/actions/create.rs index c12d416..56d946b 100644 --- a/src/actions/create.rs +++ b/src/actions/create.rs @@ -5,13 +5,13 @@ use super::ActionOptions; pub fn create(command_options: ActionOptions, fs: &impl Fs) -> Result<()> { let locations = Locations::from(&command_options); - // FIXME: Re-add old repository deletion. - // if locations.ka_path.exists() { - // fs::remove_dir_all(locations.ka_path.as_path())?; - // } - // fs::create_dir(&locations.ka_path)?; - // fs::create_dir(&locations.ka_files_path)?; + if locations.ka_path.exists() { + fs.delete_directory(&locations.ka_path)?; + } + + fs.create_directory(&locations.ka_path)?; + fs.create_directory(&locations.ka_files_path)?; let mut index_file = fs.create_file(&locations.get_repository_index_path())?; let empty_history = RepositoryHistory::default(); -- cgit 1.4.1