@@ 221-223 (lines=3) @@ | ||
218 | * as we then may need to create a /plugins or /themes directory inside of it. |
|
219 | */ |
|
220 | $remote_destination = $wp_filesystem->find_folder( WP_LANG_DIR ); |
|
221 | if ( ! $wp_filesystem->exists( $remote_destination ) ) |
|
222 | if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) |
|
223 | return new WP_Error( 'mkdir_failed_lang_dir', $this->strings['mkdir_failed'], $remote_destination ); |
|
224 | ||
225 | $language_updates_results = array(); |
|
226 |
@@ 560-564 (lines=5) @@ | ||
557 | } |
|
558 | ||
559 | //Create destination if needed |
|
560 | if ( ! $wp_filesystem->exists( $remote_destination ) ) { |
|
561 | if ( ! $wp_filesystem->mkdir( $remote_destination, FS_CHMOD_DIR ) ) { |
|
562 | return new WP_Error( 'mkdir_failed_destination', $this->strings['mkdir_failed'], $remote_destination ); |
|
563 | } |
|
564 | } |
|
565 | // Copy new version of item into place. |
|
566 | $result = copy_dir($source, $remote_destination); |
|
567 | if ( is_wp_error($result) ) { |