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
..
2023-09-25 17:04:41 +00:00
2023-07-11 05:01:05 +00:00
2024-02-06 23:44:09 +00:00
2023-05-03 10:01:52 +00:00
2023-06-22 14:34:56 +00:00
2022-08-29 12:44:30 +00:00
2022-08-29 12:44:30 +00:00
2023-09-17 15:21:07 +00:00
2023-07-09 19:50:52 +00:00
2023-12-07 15:12:25 +00:00
2024-01-26 14:18:14 +00:00
2024-02-05 22:21:35 +00:00
2019-11-01 14:55:51 +00:00
2022-03-22 16:23:32 +00:00
2024-02-12 12:05:44 +00:00
2021-09-09 13:58:25 +00:00
2024-01-30 10:28:54 +00:00
2024-01-03 21:57:32 +00:00
2023-06-14 06:32:14 +00:00
2023-06-14 06:32:14 +00:00
2024-02-06 23:44:09 +00:00
2023-06-14 06:32:14 +00:00
2023-06-14 06:32:14 +00:00
2024-01-08 23:17:48 +00:00
2023-08-24 08:59:36 +00:00
2023-09-08 09:30:38 +00:00
2023-09-14 12:44:23 +00:00
2023-06-22 14:34:56 +00:00
2023-05-08 22:35:38 +00:00
2023-09-09 09:26:01 +00:00
2024-01-15 17:40:06 +00:00
2023-09-12 15:21:02 +00:00
2024-01-07 16:07:47 +00:00
2023-10-11 07:03:04 +00:00
2023-05-03 21:28:11 +00:00
2023-05-03 21:28:11 +00:00
2023-05-03 21:28:11 +00:00
2024-01-10 11:55:04 +00:00
2023-08-14 09:57:54 +00:00
2023-06-14 12:55:11 +00:00
2023-09-22 19:56:48 +00:00
2020-11-14 16:52:25 +00:00
2024-01-15 17:40:06 +00:00
2023-09-22 19:56:48 +00:00
2023-09-22 19:56:48 +00:00
2023-09-22 19:56:48 +00:00
2023-11-15 09:31:56 +00:00
2024-02-06 23:44:09 +00:00
2024-02-06 23:44:09 +00:00
2022-10-04 03:45:37 +00:00
2023-09-22 19:56:48 +00:00
2022-03-10 19:19:50 +00:00
2023-09-08 09:30:38 +00:00
2023-11-22 17:42:11 +00:00
2023-09-22 19:56:48 +00:00
2024-01-11 17:43:00 +00:00
2023-09-26 00:24:43 +00:00
2023-11-28 20:22:26 +00:00
2023-04-23 04:00:26 +00:00
2023-09-22 19:56:48 +00:00
2023-06-14 06:32:14 +00:00
2023-05-08 22:35:38 +00:00
2023-12-01 01:33:40 +00:00
2019-10-08 17:17:07 +00:00
2023-09-10 07:31:47 +00:00
2024-01-10 11:55:04 +00:00
2022-07-20 22:14:00 +00:00
2022-09-19 23:22:40 +00:00
2023-06-22 14:34:56 +00:00
2024-02-08 20:34:32 +00:00
2024-01-10 11:55:04 +00:00
2021-12-07 12:18:50 +00:00
2023-06-19 18:26:01 +00:00
2024-02-05 22:21:35 +00:00
2024-02-02 17:46:50 +00:00
2024-02-02 17:46:50 +00:00
2022-07-29 09:20:30 +00:00
2022-10-04 03:45:37 +00:00
2024-02-02 17:46:50 +00:00
2023-11-06 09:25:02 +00:00
2023-11-26 16:41:34 +00:00
2024-02-12 15:24:02 +00:00
2022-09-20 02:49:25 +00:00
2022-09-20 02:49:25 +00:00
2023-12-08 21:24:26 +00:00
2023-09-17 15:21:07 +00:00
2023-09-17 15:21:07 +00:00
2023-09-21 01:25:38 +00:00
2023-07-09 20:05:43 +00:00
2024-02-06 23:44:09 +00:00
2024-02-12 12:31:29 +00:00
2024-02-09 19:48:41 +00:00
2023-06-22 14:34:56 +00:00
2023-09-08 10:01:14 +00:00
2024-02-02 17:46:50 +00:00
2021-05-09 20:25:41 +00:00
2023-03-10 07:02:34 +00:00
2023-12-11 12:09:42 +00:00
2023-09-08 10:01:14 +00:00
2024-01-30 10:31:00 +00:00
2022-11-29 15:49:49 +00:00
2024-02-12 16:51:48 +00:00
2023-11-08 11:04:14 +00:00
2023-12-04 19:49:18 +00:00
2023-11-17 13:27:23 +00:00
2023-09-09 09:26:01 +00:00