Make WordPress Core

Changes between Initial Version and Version 1 of Ticket #51857, comment 127


Ignore:
Timestamp:
09/22/2021 02:30:09 PM (4 years ago)
Author:
SergeyBiryukov
Comment:

Legend:

Unmodified
Added
Removed
Modified
  • Ticket #51857, comment 127

    initial v1  
    66> One thing I did notice is that the `temp-backup` directory remains in `upgrade` after an update completes. When a Core auto-update happens, the `upgrades` directory is completely emptied. Should the plugin/theme process just clean up the `temp-backup` directory?
    77
    8 The PR added an exception for the `temp-backup` folder so when an update runs, that folder does not get deleted (see https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-upgrader.php?rev=51815#L337). This was done to ensure that in case multiple updates run at the same time, the backups won't get deleted before the update finishes running. This also decreases the effect of https://core.trac.wordpress.org/ticket/53705: The downloaded/to-be-installed files get deleted, but the backup remains and is restored on failure so there are no errors.
     8The PR added an exception for the `temp-backup` folder so when an update runs, that folder does not get deleted (see https://core.trac.wordpress.org/browser/trunk/src/wp-admin/includes/class-wp-upgrader.php?rev=51815#L337). This was done to ensure that in case multiple updates run at the same time, the backups won't get deleted before the update finishes running. This also decreases the effect of #53705: The downloaded/to-be-installed files get deleted, but the backup remains and is restored on failure so there are no errors.