From: Brion Vibber Date: Wed, 27 Jun 2007 20:51:41 +0000 (+0000) Subject: Fix regression -- wfMkdirParents() started whining if target directory existed, inste... X-Git-Tag: 1.31.0-rc.0~52366 X-Git-Url: https://git.cyclocoop.org/%7B%24www_url%7Dadmin/compta/banques/%22http:/wikimediafoundation.org/fundraising/%7B%7B%20url_for%28%27user_settings%27%2C%20userid=session.userid%29%20%7D%7D?a=commitdiff_plain;h=b3813f456ae59456f42b509ab1aa263e3edddee8;p=lhc%2Fweb%2Fwiklou.git Fix regression -- wfMkdirParents() started whining if target directory existed, instead of just giving the thumbs-up --- diff --git a/includes/GlobalFunctions.php b/includes/GlobalFunctions.php index d1aac27c8d..a3a7657242 100644 --- a/includes/GlobalFunctions.php +++ b/includes/GlobalFunctions.php @@ -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 ); }