From 3aee4c27813a30e720d3ad1fbcbd2e372a88573a Mon Sep 17 00:00:00 2001 From: Andreas Gohr Date: Sun, 7 May 2006 12:13:33 +0200 Subject: changed all occurances of rename() to io_rename() darcs-hash:20060507101333-7ad00-e687d797fbee26e0b0bc7741ff8a1af496c101bf.gz --- inc/indexer.php | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) (limited to 'inc/indexer.php') diff --git a/inc/indexer.php b/inc/indexer.php index fa3803665..789a98d91 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -164,14 +164,8 @@ function idx_addPage($page){ // close the temp file and move it over to be the new one fclose($tmp); // try rename first (fast) fallback to copy (slow) - if(@rename($conf['cachedir'].'/index.tmp', - $conf['cachedir'].'/index.idx')){ - return true; - }elseif(copy($conf['cachedir'].'/index.tmp', - $conf['cachedir'].'/index.idx')){ - unlink($conf['cachedir'].'/index.tmp'); - return true; - } + io_rename($conf['cachedir'].'/index.tmp', + $conf['cachedir'].'/index.idx'); return false; } -- cgit v1.2.3