summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
Diffstat (limited to 'inc/indexer.php')
-rw-r--r--inc/indexer.php10
1 files changed, 2 insertions, 8 deletions
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;
}