From 6f265ace06d0c5d5c9a871ebcb7afc8fc67404f2 Mon Sep 17 00:00:00 2001 From: Aaron Schulz Date: Fri, 24 Jul 2009 09:22:51 +0000 Subject: [PATCH] Avoid some silly unlink notices --- includes/Cdb_PHP.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/includes/Cdb_PHP.php b/includes/Cdb_PHP.php index f2a044c55b..b2229093a6 100644 --- a/includes/Cdb_PHP.php +++ b/includes/Cdb_PHP.php @@ -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 ) ) { -- 2.20.1