From 56d54889370924612b008237138a9042bbcc4251 Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Elan=20Ruusam=C3=A4e?= <glen@delfi.ee>
Date: Sun, 8 Jul 2012 10:43:35 +0300
Subject: [PATCH] consider empty files as no file in installer

allow empty config file to proceed installation as we package default
config empty in first install

as packager may provide empty file in package, to ensure correct
file permissions.

import old patch:
http://cvs.pld-linux.org/packages/dokuwiki/install.patch
---
 install.php | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/install.php b/install.php
index 3d9fddbb2..0a2bf0a46 100644
--- a/install.php
+++ b/install.php
@@ -431,7 +431,7 @@ function check_configs(){
 
     // configs shouldn't exist
     foreach ($config_files as $file) {
-        if (@file_exists($file)) {
+        if (@file_exists($file) && filesize($file)) {
             $file    = str_replace($_SERVER['DOCUMENT_ROOT'],'{DOCUMENT_ROOT}/', $file);
             $error[] = sprintf($lang['i_confexists'],$file);
             $ok      = false;
-- 
GitLab