[wp-trac] [WordPress Trac] #57557: Switch copy_dir() with move_dir() in WP_Upgrader::install_package

WordPress Trac noreply at wordpress.org
Mon Feb 6 14:46:18 UTC 2023


#57557: Switch copy_dir() with move_dir() in WP_Upgrader::install_package
-----------------------------+-----------------------------
 Reporter:  afragen          |       Owner:  SergeyBiryukov
     Type:  enhancement      |      Status:  reopened
 Priority:  normal           |   Milestone:  6.2
Component:  Upgrade/Install  |     Version:  trunk
 Severity:  normal           |  Resolution:
 Keywords:  has-patch        |     Focuses:  performance
-----------------------------+-----------------------------

Comment (by SergeyBiryukov):

 In [changeset:"55229" 55229]:
 {{{
 #!CommitTicketReference repository="" revision="55229"
 Upgrade/Install: Send language pack updates to `copy_dir()`.

 If the `clear_working` flag in `WP_Upgrader::install_package()` is false,
 the source should not be removed, so `copy_dir()` should be used instead.

 Partial updates, like language packs, may want to retain the destination.
 If the destination exists or has contents, this may be a partial update,
 and the destination should not be removed, so `copy_dir()` should be used
 instead.

 Follow-up to [55204], [55219], [55220], [55223], [55226].

 Props afragen, costdev, swissspidy.
 See #57557.
 }}}

-- 
Ticket URL: <https://core.trac.wordpress.org/ticket/57557#comment:24>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list