mirror of
https://github.com/daylinmorgan/viv.git
synced 2024-11-12 12:13:15 -06:00
-
This commit is contained in:
parent
3ab39c45c1
commit
ea50661a04
1 changed files with 4 additions and 4 deletions
|
@ -3432,10 +3432,9 @@ class Viv:
|
||||||
if cli.is_file():
|
if cli.is_file():
|
||||||
to_remove_files.append(cli)
|
to_remove_files.append(cli)
|
||||||
|
|
||||||
to_remove = to_remove_files + [
|
to_remove = sorted(
|
||||||
f for d in to_remove_dirs for f in d.glob("**/*")
|
set(to_remove_dirs + to_remove_files), key=lambda p: p.is_file()
|
||||||
]
|
)
|
||||||
to_remove = sorted(set(to_remove), key=lambda p: p.is_file())
|
|
||||||
if confirm(
|
if confirm(
|
||||||
"Remove the above files/directories?",
|
"Remove the above files/directories?",
|
||||||
"\n".join(f" - {a.red}{p}{a.end}" for p in to_remove) + "\n",
|
"\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:
|
for p in to_remove:
|
||||||
if p.is_dir():
|
if p.is_dir():
|
||||||
|
print(sorted(p.glob("**/*")))
|
||||||
shutil.rmtree(p)
|
shutil.rmtree(p)
|
||||||
else:
|
else:
|
||||||
p.unlink()
|
p.unlink()
|
||||||
|
|
Loading…
Reference in a new issue