Ticket #26781: dirperms.diff
File dirperms.diff, 730 bytes (added by , 10 years ago) |
---|
-
src/wp-includes/functions.php
1378 1378 if ( @mkdir( $target, $dir_perms, true ) ) { 1379 1379 1380 1380 // If a umask is set that modifies $dir_perms, we'll have to re-set the $dir_perms correctly with chmod() 1381 if ( $dir_perms != $dir_perms & ~umask() ) {1381 if ( $dir_perms != ( $dir_perms & ~umask() ) ) { 1382 1382 $folder_parts = explode( '/', substr( $target, strlen( $target_parent ) + 1 ) ); 1383 1383 for ( $i = 1; $i <= count( $folder_parts ); $i++ ) { 1384 1384 @chmod( $target_parent . '/' . implode( '/', array_slice( $folder_parts, 0, $i ) ), $dir_perms );