diff options
Diffstat (limited to 'src/actions')
| -rw-r--r-- | src/actions/create.rs | 12 |
1 files changed, 6 insertions, 6 deletions
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(); |
