r93018 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r93017‎ | r93018 | r93019 >
Date:21:40, 24 July 2011
Author:aaron
Status:ok (Comments)
Tags:
Comment:
Added possible error msg to refreshWikiversionsCDB for rename()
Modified paths:
  • /trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB (modified) (history)

Diff [purge]

Index: trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB
@@ -30,12 +30,14 @@
3131
3232 # Sanity...
3333 if ( !file_exists( $tmpDBPath ) ) {
34 - die( "Unable to create wikiversions.cdb.\n" );
 34+ die( "Unable to create wikiversions.cdb.tmp.\n" );
3535 }
3636
3737 # Move to final location only when finished...
3838 @unlink( $finalDBPath );
39 - rename( $tmpDBPath, $finalDBPath );
 39+ if ( !rename( $tmpDBPath, $finalDBPath ) ) {
 40+ die( "Unable to create wikiversions.cdb.\n" );
 41+ }
4042 }
4143
4244 refreshWikiversionsCDB();

Comments

#Comment by Catrope (talk | contribs)   18:50, 25 July 2011

Alright, this addresses most of my earlier CR comment, except that there were two instances where "Unable to create wikiversions.cdb" was thrown and you only changed one.

Status & tagging log