Fix bug that prevents sites-available file from being deleted

This commit is contained in:
Jamie Cameron
2008-11-01 19:25:20 +00:00
parent 249895add6
commit 976bf084ea

View File

@@ -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);
}