From 606fef685628b2c4a93f188b1e95a52039a3a67f Mon Sep 17 00:00:00 2001 From: Ralf Becker Date: Mon, 22 Jun 2009 08:07:52 +0000 Subject: [PATCH] only delete header, if it does exist and is NOT writable (otherwise the header is owned by the user running the script) --- setup/inc/class.setup_cmd_header.inc.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/setup/inc/class.setup_cmd_header.inc.php b/setup/inc/class.setup_cmd_header.inc.php index 6be94efad3..9ec5e4fdeb 100644 --- a/setup/inc/class.setup_cmd_header.inc.php +++ b/setup/inc/class.setup_cmd_header.inc.php @@ -138,7 +138,7 @@ class setup_cmd_header extends setup_cmd if (file_exists($this->header_path) && is_writable($this->header_path) || is_writable(dirname($this->header_path)) || function_exists('posix_getuid') && !posix_getuid()) // root has all rights { - if (posix_getuid() && is_writable(dirname($this->header_path)) && file_exists($this->header_path)) + if (file_exists($this->header_path) && !is_writable($this->header_path)) { unlink($this->header_path); }