From d7c3763d432de58f39ae826bbcf80f5e8667171f Mon Sep 17 00:00:00 2001 From: Dave Doyle Date: Tue, 6 Sep 2005 23:40:43 +0200 Subject: indexer rename bugfix for Win32 darcs-hash:20050906214043-a62d3-65097acf0b035fd6fe9833136a15f9562e69970f.gz --- inc/indexer.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) (limited to 'inc') diff --git a/inc/indexer.php b/inc/indexer.php index 65ae126dd..e3af1fd4a 100644 --- a/inc/indexer.php +++ b/inc/indexer.php @@ -148,8 +148,12 @@ function idx_addPage($page){ // close the temp file and move it over to be the new one fclose($tmp); - return rename($conf['cachedir'].'/index.tmp', - $conf['cachedir'].'/index.idx'); + if(copy($conf['cachedir'].'/index.tmp', + $conf['cachedir'].'/index.idx')){ + unlink($conf['cachedir'].'/index.tmp'); + return true; + } + else{return false;} } /** -- cgit v1.2.3