| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
This update ensures that there are no inconsistencies when the ouput directory has already been build then it just doesn't appends but first removes and then writes to the output directory. Tests Passed: Yes
|
It's definitely a good idea to improve the consistency of repeated runs! I wonder if this behavior might be a bit unsafe though. Given sufficient user error, it might lead to unintentional deletions of arbitrary directories. Maybe the default should be to just abort the run if the output directory already exists and is not empty. We could implement "force" flag -f to optionally remove the output directory before the run. What do you think? |
Sorry, something went wrong.
|
Yes actually, might be a error saying that the output directory exists would also have been sufficient, and deleting without the user consent is also a wrong behaviour so, we can just make it to throw error if output directory already exists and is not empty. So that user can take the further step whether to delete the directory or to make another directory. Is that fine ? |
Sorry, something went wrong.
| fmt::print( "Using input file: {}\n", config_file_path.string() ); | ||
| fmt::print( "Output directory path set to: {}\n", output_dir_path.string() ); | ||
|
|
||
| fs::remove_all(output_dir_path);// Remove any existing output directory |
There was a problem hiding this comment.
Make this conditional on a --force flag.
Sorry, something went wrong.
| Back | FazBrowse Home | New Git URL |
This update ensures that there are no inconsistencies when the ouput directory has already been build then it just doesn't appends but first removes and then writes to the output directory.
Tests Passed: Yes