From b771139ccbd900f773c92470ba006c79759f1fef Mon Sep 17 00:00:00 2001
From: tbrehm <t.brehm@ispconfig.org>
Date: Wed, 24 Feb 2010 09:11:42 -0500
Subject: [PATCH] Improved debian installer.

---
 install/lib/install.lib.php |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/install/lib/install.lib.php b/install/lib/install.lib.php
index d19a2dd..d742337 100644
--- a/install/lib/install.lib.php
+++ b/install/lib/install.lib.php
@@ -259,10 +259,14 @@
 
 function rf($file){
 	clearstatcache();
-	if(!$fp = fopen ($file, 'rb')){
-		ilog('WARNING: could not open file '.$file);
+	if(is_file($file)) {
+		if(!$fp = fopen ($file, 'rb')){
+			ilog('WARNING: could not open file '.$file);
+		}
+		return filesize($file) > 0 ? fread($fp, filesize($file)) : '';
+	} else {
+		return '';
 	}
-	return filesize($file) > 0 ? fread($fp, filesize($file)) : '';
 }
 
 function wf($file, $content){

--
Gitblit v1.9.1