From 44d92302fdfc606010ba1a5595a08522631a1c65 Mon Sep 17 00:00:00 2001 From: Stifler Date: Thu, 9 Dec 2021 14:15:33 +1030 Subject: use 'rm -fr' to remove directories on clean (#7) during clean function, removing unnecessary directories fails if a file has been left behind. --- apt-mirror | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/apt-mirror b/apt-mirror index bd5310f..8f36d34 100755 --- a/apt-mirror +++ b/apt-mirror @@ -1053,7 +1053,7 @@ else print CLEAN "echo 'Removing $total unnecessary directories...'\n"; foreach (@rm_dirs) { - print CLEAN "if test -d '$_'; then rmdir '$_'; fi\n"; + print CLEAN "if test -d '$_'; then rm -fr '$_'; fi\n"; print CLEAN "echo -n '[" . int( 100 * $i / $total ) . "\%]'\n" unless $i % 50; print CLEAN "echo -n .\n"; $i++; -- cgit v1.2.3