mirror of
https://github.com/webmin/webmin.git
synced 2026-05-04 22:30:33 +01:00
Fix bug that prevents sites-available file from being deleted
This commit is contained in:
@@ -642,10 +642,11 @@ return $line;
|
||||
sub delete_file_if_empty
|
||||
{
|
||||
local ($file) = @_;
|
||||
local $lref = &read_file_lines($file);
|
||||
local $lref = &read_file_lines($file, 1);
|
||||
foreach my $l (@$lref) {
|
||||
return 0 if ($l =~ /\S/);
|
||||
}
|
||||
&unflush_file_lines($file);
|
||||
unlink($file);
|
||||
&delete_webfile_link($file);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user