[wp-trac] [WordPress Trac] #20411: wp_mkdir_p() returning false for is_dir( dirname( $target ) )
WordPress Trac
wp-trac at lists.automattic.com
Wed Apr 11 11:18:22 UTC 2012
#20411: wp_mkdir_p() returning false for is_dir( dirname( $target ) )
--------------------------+-------------------------------------
Reporter: Haro G | Owner: harogharbigi@…
Type: defect (bug) | Status: closed
Priority: normal | Milestone:
Component: General | Version: 3.4
Severity: normal | Resolution: invalid
Keywords: |
--------------------------+-------------------------------------
Changes (by duck_):
* status: new => closed
* resolution: => invalid
* milestone: Awaiting Review =>
Comment:
`is_dir( dirname( $target ) )` returns false because the function was
unable to create the $target directory even though the parent directory
already exists. This is the correct behaviour.
True is returned when the $target already exists and is a directory:
{{{
if ( file_exists( $target ) )
return @is_dir( $target );
}}}
Closing as invalid. Please re-open if I misunderstood.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20411#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list