http://www.mediawiki.org/wiki/Special:Code/MediaWiki/54968

Revision: 54968
Author:   aaron
Date:     2009-08-13 20:55:26 +0000 (Thu, 13 Aug 2009)

Log Message:
-----------
Fixed 'permission denied' cdb fatals (on windows at least)

Modified Paths:
--------------
    trunk/phase3/includes/LocalisationCache.php

Modified: trunk/phase3/includes/LocalisationCache.php
===================================================================
--- trunk/phase3/includes/LocalisationCache.php 2009-08-13 20:52:54 UTC (rev 
54967)
+++ trunk/phase3/includes/LocalisationCache.php 2009-08-13 20:55:26 UTC (rev 
54968)
@@ -827,6 +827,10 @@
                                        "directory \"{$this->directory}\"" );
                        }
                }
+               // Close reader to stop permission errors on write
+               if( !empty($this->readers[$code]) ) {
+                       $this->readers[$code]->close();
+               }
                $this->writer = CdbWriter::open( $this->getFileName( $code ) );
                $this->currentLang = $code;
        }
@@ -836,7 +840,7 @@
                $this->writer->close();
                $this->writer = null;
 
-               // Reopen the reader
+               // Close and remove the reader
                if ( !empty( $this->readers[$this->currentLang] ) ) {
                        $this->readers[$this->currentLang]->close();
                }



_______________________________________________
MediaWiki-CVS mailing list
MediaWiki-CVS@lists.wikimedia.org
https://lists.wikimedia.org/mailman/listinfo/mediawiki-cvs

Reply via email to