[wp-trac] [WordPress Trac] #42963: Improve deletion of $_old_files during upgrades
WordPress Trac
noreply at wordpress.org
Tue Jan 9 05:19:58 UTC 2018
#42963: Improve deletion of $_old_files during upgrades
-----------------------------+------------------
Reporter: joemcgill | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 5.0
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: has-patch | Focuses:
-----------------------------+------------------
Comment (by dd32):
`is_file( $old_file )` won't work as expected here, as `$to` is not always
a full filesystem path.
Personally I think we can skip the `is_file()` check, as `delete()` should
return correctly.
In the worst case scenario, where `delete()` returns incorrectly, it'll
get removed on the next run hopefully.
This seems like a good addition overall. I think we should also consider
back-porting the change to all autoupdate branches so that all updates are
consistent.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/42963#comment:2>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list