Avoid some silly unlink notices
authorAaron Schulz <aaron@users.mediawiki.org>
Fri, 24 Jul 2009 09:22:51 +0000 (09:22 +0000)
committerAaron Schulz <aaron@users.mediawiki.org>
Fri, 24 Jul 2009 09:22:51 +0000 (09:22 +0000)
includes/Cdb_PHP.php

index f2a044c..b222909 100644 (file)
@@ -251,7 +251,7 @@ class CdbWriter_PHP extends CdbWriter {
        public function close() {
                $this->finish();
                fclose( $this->handle );
-               if ( wfIsWindows() ) {
+               if ( wfIsWindows() && file_exists($this->realFileName) ) {
                        unlink( $this->realFileName );
                }
                if ( !rename( $this->tmpFileName, $this->realFileName ) ) {