[wp-trac] [WordPress Trac] #17680: Using "update automatically" can destroy a theme in a Windows environment

WordPress Trac wp-trac at lists.automattic.com
Sat Jun 4 01:39:56 UTC 2011


#17680: Using "update automatically" can destroy a theme in a Windows environment
-----------------------------+-----------------------------
 Reporter:  blurback         |       Owner:
     Type:  defect (bug)     |      Status:  new
 Priority:  normal           |   Milestone:  Future Release
Component:  Upgrade/Install  |     Version:
 Severity:  major            |  Resolution:
 Keywords:  has-patch        |
-----------------------------+-----------------------------
Changes (by dd32):

 * keywords:   => has-patch
 * milestone:  Awaiting Review => Future Release


Comment:

 In most windows environments, renaming the folder moves the locks with it,
 which is what makes this work.. In other windows environments, locks are
 lost when moving the folder, which allows this to work, In some windows
 environments, locks prevent the parent directory from being renamed, which
 allows this to work.

 All in all, this is probably the best option, an extension of this would
 be if there's an error during copying the new theme in place, to delete
 the partial and rename the old one back into place.

 Note, the patch is incomplete as it uses rename directly, which we can't
 do on many systems, instead, $wp_filesystem->move() (Which is a single fs
 request compared to copy_dir() which makes many fs requests.)

 Leaving as has-patch for now given it's minor details we can look closer
 at when implementing.

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/17680#comment:1>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list