Fix regression -- wfMkdirParents() started whining if target directory existed, inste...
authorBrion Vibber <brion@users.mediawiki.org>
Wed, 27 Jun 2007 20:51:41 +0000 (20:51 +0000)
committerBrion Vibber <brion@users.mediawiki.org>
Wed, 27 Jun 2007 20:51:41 +0000 (20:51 +0000)
includes/GlobalFunctions.php

index d1aac27..a3a7657 100644 (file)
@@ -1665,6 +1665,8 @@ function wfTempDir() {
 function wfMkdirParents( $fullDir, $mode = 0777 ) {
        if( strval( $fullDir ) === '' )
                return true;
+       if( file_exists( $fullDir ) )
+               return true;
        return mkdir( $fullDir, $mode, true );
 }