From ea50661a0454a91fbdd3491ac444db6e14e63502 Mon Sep 17 00:00:00 2001 From: Daylin Morgan Date: Fri, 12 Jul 2024 12:33:22 -0500 Subject: [PATCH] - --- src/viv/viv.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/viv/viv.py b/src/viv/viv.py index 8814bc8..8eb07b9 100755 --- a/src/viv/viv.py +++ b/src/viv/viv.py @@ -3432,10 +3432,9 @@ class Viv: if cli.is_file(): to_remove_files.append(cli) - to_remove = to_remove_files + [ - f for d in to_remove_dirs for f in d.glob("**/*") - ] - to_remove = sorted(set(to_remove), key=lambda p: p.is_file()) + to_remove = sorted( + set(to_remove_dirs + to_remove_files), key=lambda p: p.is_file() + ) if confirm( "Remove the above files/directories?", "\n".join(f" - {a.red}{p}{a.end}" for p in to_remove) + "\n", @@ -3443,6 +3442,7 @@ class Viv: ): for p in to_remove: if p.is_dir(): + print(sorted(p.glob("**/*"))) shutil.rmtree(p) else: p.unlink()