Ensure slashing of paths returned by WP_Filesystem_Base::find_folder() is consistent with the slashing of paths; Affects Windows machines using the Direct transport.
git-svn-id: http://svn.automattic.com/wordpress/trunk@14810 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
be365e349f
commit
394fa6d6b2
|
@ -142,6 +142,7 @@ class WP_Filesystem_Base {
|
||||||
if ( defined($constant) && $folder === $dir )
|
if ( defined($constant) && $folder === $dir )
|
||||||
return trailingslashit(constant($constant));
|
return trailingslashit(constant($constant));
|
||||||
} elseif ( 'direct' == $this->method ) {
|
} elseif ( 'direct' == $this->method ) {
|
||||||
|
$folder = str_replace('\\', '/', $folder); //Windows path sanitiation
|
||||||
return trailingslashit($folder);
|
return trailingslashit($folder);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue