From 150830180c79d7688ef4ba41cd13323d760d033b Mon Sep 17 00:00:00 2001 From: Eric Barnes Date: Mon, 21 Mar 2011 22:13:12 -0400 Subject: If you do is_really_writable() on a file that does not exist on a Windows server or on a Unix box with safe_mode enabled, it will create the file and leave it there. Fixes #80 --- system/core/Common.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/system/core/Common.php b/system/core/Common.php index cd6b93355..f424a2cc9 100644 --- a/system/core/Common.php +++ b/system/core/Common.php @@ -88,7 +88,7 @@ @unlink($file); return TRUE; } - elseif (($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) + elseif ( ! is_file($file) OR ($fp = @fopen($file, FOPEN_WRITE_CREATE)) === FALSE) { return FALSE; } -- cgit v1.2.3-24-g4f1b