[wp-trac] [WordPress Trac] #58995: Remove individual files from `$_old_files` array when its parent directory is already included

WordPress Trac noreply at wordpress.org
Mon Aug 7 17:34:27 UTC 2023


#58995: Remove individual files from `$_old_files` array when its parent directory
is already included
-----------------------------+----------------------------------------
 Reporter:  davidbaumwald    |      Owner:  (none)
     Type:  defect (bug)     |     Status:  new
 Priority:  normal           |  Milestone:  6.4
Component:  Upgrade/Install  |    Version:  trunk
 Severity:  normal           |   Keywords:  needs-patch good-first-bug
  Focuses:                   |
-----------------------------+----------------------------------------
 Chatting with @SergeyBiryukov, it seems that `$wp_filesystem->delete(
 $old_file, true )` is called on entries in the array and the second
 parameter, `$recursive`, is set to `true`. So, individual files aren't
 necessary when the parent directory is included.

 Some precedent exists higher up for older version where individual files
 were excluded, such as `wp-includes/js/tinymce/plugins/wpembed`.

 Props to @SergeyBiryukov for the discussion.

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/58995>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list