1787
1787
return @is_dir( $target );
1791
if ( false !== strpos( $target, '../' ) || false !== strpos( $target, '..' . DIRECTORY_SEPARATOR ) ) {
1790
1795
// We need to find the permissions of the parent folder that exists and inherit that.
1791
1796
$target_parent = dirname( $target );
1792
1797
while ( '.' != $target_parent && ! is_dir( $target_parent ) && dirname( $target_parent ) !== $target_parent ) {