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:
dd32
2011-10-13 10:43:38 +00:00
parent 144a8ad8ce
commit 53062d6414
4 changed files with 12 additions and 1 deletions

View File

@@ -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 )