Index: trunk/tools/mwmultiversion/multiversion/refreshWikiversionsCDB |
— | — | @@ -30,12 +30,14 @@ |
31 | 31 | |
32 | 32 | # Sanity... |
33 | 33 | if ( !file_exists( $tmpDBPath ) ) { |
34 | | - die( "Unable to create wikiversions.cdb.\n" ); |
| 34 | + die( "Unable to create wikiversions.cdb.tmp.\n" ); |
35 | 35 | } |
36 | 36 | |
37 | 37 | # Move to final location only when finished... |
38 | 38 | @unlink( $finalDBPath ); |
39 | | - rename( $tmpDBPath, $finalDBPath ); |
| 39 | + if ( !rename( $tmpDBPath, $finalDBPath ) ) { |
| 40 | + die( "Unable to create wikiversions.cdb.\n" ); |
| 41 | + } |
40 | 42 | } |
41 | 43 | |
42 | 44 | refreshWikiversionsCDB(); |