Set perms when making plugin dirs. see #7395

git-svn-id: https://develop.svn.wordpress.org/trunk@9524 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
Ryan Boren 2008-11-05 17:35:58 +00:00
parent 742c91322a
commit 6b21746eea
2 changed files with 7 additions and 6 deletions

View File

@ -753,7 +753,7 @@ function wp_install_plugin($package, $feedback = '') {
//Create folder if not exists.
if( ! $wp_filesystem->exists( $res['to'] ) )
if ( ! $wp_filesystem->mkdir( $res['to'] ) )
if ( ! $wp_filesystem->mkdir( $res['to'], 0755 ) )
return new WP_Error('mkdir_failed', __('Could not create directory'), $res['to']);
// Copy new version of plugin into place.
@ -844,10 +844,11 @@ function wp_install_plugin_local_package($package, $feedback = '') {
$res = update_pluginfiles_base_dir($working_dir . '/' . $filelist[0], $plugins_dir . $filelist[0]);
//Create folder if not exists.
if( ! $wp_filesystem->exists( $res['to'] ) )
if ( ! $wp_filesystem->mkdir( $res['to'] ) )
return new WP_Error('mkdir_failed', __('Could not create directory'), $res['to']);
if( ! $wp_filesystem->exists( $res['to'] ) ) {
if ( ! $wp_filesystem->mkdir( $res['to'], 0755 ) )
return new WP_Error('mkdir_failed', __('Could not create directory'), $res['to']);
}
// Copy new version of plugin into place.
$result = copy_dir($res['from'], $res['to']);
if ( is_wp_error($result) ) {

View File

@ -254,7 +254,7 @@ function wp_update_plugin($plugin, $feedback = '') {
//Create folder if not exists.
if( ! $wp_filesystem->exists( $res['to'] ) )
if ( ! $wp_filesystem->mkdir( $res['to'] ) )
if ( ! $wp_filesystem->mkdir( $res['to'], 0755 ) )
return new WP_Error('mkdir_failed', __('Could not create directory'), $res['to']);
// Copy new version of plugin into place.