diff --git a/slpkg/utilities.py b/slpkg/utilities.py index 15e9e61c..9662523b 100644 --- a/slpkg/utilities.py +++ b/slpkg/utilities.py @@ -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: