Changeset 55219
- Timestamp:
- 02/04/2023 01:06:57 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/file.php
r55210 r55219 1956 1956 * Assumes that WP_Filesystem() has already been called and setup. 1957 1957 * 1958 * This function is not designed to merge directories, copy_dir() should be used instead. 1959 * 1958 1960 * @since 6.2.0 1959 1961 * … … 1980 1982 } 1981 1983 1982 if ( $wp_filesystem->move( $from, $to, $overwrite ) ) { 1984 if ( $overwrite && $wp_filesystem->exists( $to ) && ! $wp_filesystem->delete( $to, true ) ) { 1985 // Can't overwrite if the destination couldn't be deleted. 1986 return WP_Error( 'destination_not_deleted_move_dir', __( 'The destination directory already exists and could not be removed.' ) ); 1987 } 1988 1989 if ( $wp_filesystem->move( $from, $to ) ) { 1983 1990 /* 1984 1991 * When using an environment with shared folders,
Note: See TracChangeset
for help on using the changeset viewer.