Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Add recursive creation directories #12

Closed
wants to merge 2 commits into from

2 participants

@woodpeople

No description provided.

@nacin
Owner

This is a read-only Git mirror here. Closing in favor of http://core.trac.wordpress.org/ticket/21234.

@nacin nacin closed this
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Jul 10, 2012
  1. Add recursive creation directories

    Alisher Agzamov authored
  2. deleted extra code from recursive creation directory function wp_mkdi…

    Alisher Agzamov authored
    …r_p()
This page is out of date. Refresh to see the latest.
Showing with 2 additions and 15 deletions.
  1. +2 −15 wp-includes/functions.php
View
17 wp-includes/functions.php
@@ -1300,23 +1300,10 @@ function wp_mkdir_p( $target ) {
$target = '/';
if ( file_exists( $target ) )
- return @is_dir( $target );
+ return is_dir( $target );
// Attempting to create the directory may clutter up our display.
- if ( @mkdir( $target ) ) {
- $stat = @stat( dirname( $target ) );
- $dir_perms = $stat['mode'] & 0007777; // Get the permission bits.
- @chmod( $target, $dir_perms );
- return true;
- } elseif ( is_dir( dirname( $target ) ) ) {
- return false;
- }
-
- // If the above failed, attempt to create the parent node, then try again.
- if ( ( $target != '/' ) && ( wp_mkdir_p( dirname( $target ) ) ) )
- return wp_mkdir_p( $target );
-
- return false;
+ return @mkdir( $target, 0777, true );
}
/**
Something went wrong with that request. Please try again.