From e06a4e3197b5d0e22b840be25821cf14ac72da73 Mon Sep 17 00:00:00 2001 From: dw-0 Date: Thu, 27 Jun 2024 20:58:33 +0200 Subject: [PATCH] fix: add recursive removal of files Signed-off-by: Dominik Willner --- kiauh/utils/fs_utils.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/kiauh/utils/fs_utils.py b/kiauh/utils/fs_utils.py index c2466c2..7149aad 100644 --- a/kiauh/utils/fs_utils.py +++ b/kiauh/utils/fs_utils.py @@ -59,9 +59,9 @@ def create_symlink(source: Path, target: Path, sudo=False) -> None: raise -def remove_with_sudo(file_path: Path) -> None: +def remove_with_sudo(file: Path) -> None: try: - cmd = ["sudo", "rm", "-f", file_path] + cmd = ["sudo", "rm", "-rf", file] run(cmd, stderr=PIPE, check=True) except CalledProcessError as e: Logger.print_error(f"Failed to remove file: {e}")