output dir bug fixed

This commit is contained in:
Lorenzo Volpi 2023-10-23 08:27:48 +02:00
parent 10daf1e723
commit a4c4e618bf
1 changed files with 4 additions and 1 deletions

View File

@ -8,7 +8,10 @@ from quacc.environ import env
def create_out_dir(dir_name):
dir_path = Path(env.OUT_DIR_NAME) / dir_name
base_out_dir = Path(env.OUT_DIR_NAME)
if not base_out_dir.exists():
os.mkdir(base_out_dir)
dir_path = base_out_dir / dir_name
env.OUT_DIR = dir_path
shutil.rmtree(dir_path, ignore_errors=True)
os.mkdir(dir_path)