diff --git a/generate.py b/generate.py index 6910e19..14b7463 100755 --- a/generate.py +++ b/generate.py @@ -48,12 +48,12 @@ def create_dir(filename): removal if it exists. """ try: - os.makedirs(path) + os.makedirs(filename) except FileExistsError: if not query_yes_no('Folder exists, remove?', default='yes'): return False - shutil.rmtree(path) - os.makedirs(path) + shutil.rmtree(filename) + os.makedirs(filename) return True def create_header(headerfile, experiment, destination):