From e695fdc83ef295fd18e9757ff5b12f3d9a8d213c Mon Sep 17 00:00:00 2001 From: Andrew Dolgov Date: Thu, 25 Aug 2005 11:28:54 +0100 Subject: images moved to subdirectory, updated TODO --- functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'functions.php') diff --git a/functions.php b/functions.php index 4dafe4578..0d668eda6 100644 --- a/functions.php +++ b/functions.php @@ -35,7 +35,7 @@ $icon_file = ICONS_DIR . "/$feed.ico"; if (!file_exists($icon_file)) { - + error_reporting(0); $r = fopen($icon_url, "r"); error_reporting (E_ERROR | E_WARNING | E_PARSE); @@ -53,7 +53,11 @@ fclose($r); fclose($t); - rename($tmpfname, $icon_file); + error_reporting(0); + if (!rename($tmpfname, $icon_file)) { + unlink($tmpfname); + } + error_reporting (E_ERROR | E_WARNING | E_PARSE); } } -- cgit v1.2.3