Updated for remove folder

This commit is contained in:
Dimitris Zlatanidis 2023-04-10 21:41:22 +03:00
parent d735b2ca31
commit b6dd41b533

View file

@ -79,9 +79,8 @@ class Utilities:
@staticmethod
def remove_folder_if_exists(folder: Path) -> None:
""" Clean the old folders. """
directory = Path(folder)
if directory.exists():
shutil.rmtree(directory)
if folder.exists():
shutil.rmtree(folder)
@staticmethod
def create_folder(path: Path, folder: str) -> None: