From 976bf084ea9fed5842a219e7bc74577bb206e6e2 Mon Sep 17 00:00:00 2001 From: Jamie Cameron Date: Sat, 1 Nov 2008 19:25:20 +0000 Subject: [PATCH] Fix bug that prevents sites-available file from being deleted --- apache/apache-lib.pl | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/apache/apache-lib.pl b/apache/apache-lib.pl index 3aeddbb36..e064ed469 100644 --- a/apache/apache-lib.pl +++ b/apache/apache-lib.pl @@ -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); }