summaryrefslogtreecommitdiff
path: root/inc/indexer.php
diff options
context:
space:
mode:
authorAndreas Gohr <andi@splitbrain.org>2006-05-07 12:13:33 +0200
committerAndreas Gohr <andi@splitbrain.org>2006-05-07 12:13:33 +0200
commit3aee4c27813a30e720d3ad1fbcbd2e372a88573a (patch)
tree133a229e3ab17cb7249bdcb30a76c12ec0349985 /inc/indexer.php
parent15c394af375029974595fcd96feeadcb4e7005b8 (diff)
downloadrpg-3aee4c27813a30e720d3ad1fbcbd2e372a88573a.tar.gz
rpg-3aee4c27813a30e720d3ad1fbcbd2e372a88573a.tar.bz2
changed all occurances of rename() to io_rename()
darcs-hash:20060507101333-7ad00-e687d797fbee26e0b0bc7741ff8a1af496c101bf.gz
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;
}