Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/Stifler6996/apt-mirror.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStifler <Stifler6996@users.noreply.github.com>2021-12-09 06:45:33 +0300
committerGitHub <noreply@github.com>2021-12-09 06:45:33 +0300
commit44d92302fdfc606010ba1a5595a08522631a1c65 (patch)
tree8ca6365c56c2e78fc6235d2befeea12c110eb3f7
parent7ae190bee2a2ae558e7a83e8735fec34b7bc800d (diff)
use 'rm -fr' to remove directories on clean (#7)
during clean function, removing unnecessary directories fails if a file has been left behind.
-rwxr-xr-xapt-mirror2
1 files changed, 1 insertions, 1 deletions
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++;