summaryrefslogtreecommitdiff
path: root/inc
diff options
context:
space:
mode:
Diffstat (limited to 'inc')
-rw-r--r--inc/indexer.php10
-rw-r--r--inc/init.php2
2 files changed, 3 insertions, 9 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;
}
diff --git a/inc/init.php b/inc/init.php
index ab986b0d2..00d6a6a90 100644
--- a/inc/init.php
+++ b/inc/init.php
@@ -313,7 +313,7 @@ function scriptify($file) {
}
fclose($fh);
//try to rename the old file
- @rename($file,"$file.old");
+ io_rename($file,"$file.old");
}
/**