summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--inc/indexer.php8
1 files changed, 6 insertions, 2 deletions
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;}
}
/**