From 916de8d0aeca366f8a92ff7fa4a59d8b6f398dd5 Mon Sep 17 00:00:00 2001 From: Sarah Vaupel Date: Tue, 17 Sep 2024 00:52:54 +0200 Subject: [PATCH] build(frontend): fix faviconize dir removal --- utils/faviconize.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/utils/faviconize.pl b/utils/faviconize.pl index 8298a4cc5..02d64829d 100755 --- a/utils/faviconize.pl +++ b/utils/faviconize.pl @@ -18,7 +18,11 @@ my @sizes = split m/,/, $sizes; my $include = ""; mkdir($faviconDir); -system("rm $faviconDir/*"); +my $dir = undef; +opendir($dir, $faviconDir) or die "Could not read directory '$faviconDir', because: $!\n"; +while(my $fn = readdir($dir)) { + unlink("$faviconDir/$fn") if -d "$faviconDir/$fn" +} for my $s(@sizes) { resize($s, "favicon-${s}x$s.png"); }