WP_Filesystem_*::mkdir() untrailingslash path consistently, don't waste time attempting to create an "empty" path. See #15575. Props lordandrei and SergeyBiryukov for initial patches.
git-svn-id: http://svn.automattic.com/wordpress/trunk@18964 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
@@ -267,6 +267,10 @@ class WP_Filesystem_ftpsockets extends WP_Filesystem_Base {
|
||||
}
|
||||
|
||||
function mkdir($path, $chmod = false, $chown = false, $chgrp = false ) {
|
||||
$path = untrailingslashit($path);
|
||||
if ( empty($path) )
|
||||
return false;
|
||||
|
||||
if ( ! $this->ftp->mkdir($path) )
|
||||
return false;
|
||||
if ( ! $chmod )
|
||||
|
||||
Reference in New Issue
Block a user