- Timestamp:
- 01/29/2020 12:43:23 AM (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/wp-admin/includes/class-wp-filesystem-direct.php
r46679 r47122 132 132 return chgrp( $file, $group ); 133 133 } 134 // Is a directory, and we want recursive 134 // Is a directory, and we want recursive. 135 135 $file = trailingslashit( $file ); 136 136 $filelist = $this->dirlist( $file ); … … 168 168 return chmod( $file, $mode ); 169 169 } 170 // Is a directory, and we want recursive 170 // Is a directory, and we want recursive. 171 171 $file = trailingslashit( $file ); 172 172 $filelist = $this->dirlist( $file ); … … 199 199 return chown( $file, $owner ); 200 200 } 201 // Is a directory, and we want recursive 201 // Is a directory, and we want recursive. 202 202 $filelist = $this->dirlist( $file ); 203 203 foreach ( $filelist as $filename ) { … … 328 328 */ 329 329 public function delete( $file, $recursive = false, $type = false ) { 330 if ( empty( $file ) ) { // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. 331 return false; 332 } 333 $file = str_replace( '\\', '/', $file ); // for win32, occasional problems deleting files otherwise 330 if ( empty( $file ) ) { 331 // Some filesystems report this as /, which can cause non-expected recursive deletion of all files in the filesystem. 332 return false; 333 } 334 $file = str_replace( '\\', '/', $file ); // For Win32, occasional problems deleting files otherwise. 334 335 335 336 if ( 'f' == $type || $this->is_file( $file ) ) { … … 340 341 } 341 342 342 // At this point it's a folder, and we're in recursive mode 343 // At this point it's a folder, and we're in recursive mode. 343 344 $file = trailingslashit( $file ); 344 345 $filelist = $this->dirlist( $file, true );
Note: See TracChangeset
for help on using the changeset viewer.