Files
wordpress-develop/src/wp-admin/includes
David Baumwald 4fe09a2df3 Upgrade/Install: Remove unnecessary individual subfiles from $_old_files array.
On upgrade, the `$_old_files` array is used to cleanup any files that exist in a previous version of core but are no longer present in the current version.  Sometimes, an entire directory should be removed.  In the past, when a parent directory was included in the array, subfiles were also included for good measure.  

However, the code that removes the old files uses `$wp_filesystem->delete()` with the `$recursive` parameter set to `true`.  With this setup, individual subfiles are not required to be individually listed when their parent directory is already included in the `$_old_files` array.

This commit removes all individual subfiles from the `$_old_files` array when their parent directory is already included.

Props SergeyBiryukov, mhshohel, pbiron, oglekler.
Fixes #58995.

git-svn-id: https://develop.svn.wordpress.org/trunk@57598 602fd350-edb4-49c9-b593-d223f7449a82
2024-02-12 16:51:48 +00:00
..
2024-02-02 17:46:50 +00:00
2024-02-02 17:46:50 +00:00
2024-02-02 17:46:50 +00:00
2024-02-02 17:46:50 +00:00