[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 04:30:08 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 |
-----------------------------+-----------------------------
Comment (by blurback):
Replying to [comment:1 dd32]:
> 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.
Agree.
> Note, the patch is incomplete as it uses rename directly, which we can't
do on many systems, instead, $wp_filesystem->move()
I did first try `$wp_filesystem->move()` but encountered an error. If I
remember correctly, the problem was that
[http://core.trac.wordpress.org/browser/trunk/wp-admin/includes/class-wp-
filesystem-direct.php?rev=17926#L206 $wp_filesystem->move()] first tries
`@rename` and if that fails it tries to copy (which is not a recursive
function and errors).
I used `@rename` directly I took it from the first have of wp's move
function. I did try it on a unix system and win system without issue.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/17680#comment:2>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list