Using "update automatically" can destroy a theme in a Windows environment
|Reported by:||blurback||Owned by:||dd32|
If there are any locked files or files in use, Update Automatically destroys the theme.
I've experienced this three different ways:
- The machine is really slow to delete the original theme dir, when the update is moved into the themes dir, an error occurs: "Could not create directory". The theme is now gone.
- If there are any locked files in the outdated theme (e.g. SVN), all the files except the locked one will be deleted. Upgrader bails and you're left with a broken/empty theme.
- If any of the files are in use, all files inside the theme will be deleted but the file system will throw an error. The updater bails with an empty theme directory.
Steps to duplicate:
- On a Win hosted install, open the twentyten theme directory
- Edit stylesheet, change version to 1.0
- Open screenshot.png in paint
- In the wp-admin, upgrade the theme
- Sad times (screenshot attached)
Proposed solution is to try to rename the old theme first. Provides two benefits:
- Have a backup of original theme if something breaks mid-way
- Never left with a broken site
Note: all the more reasons why one should not use Windows :/ but I have no choice.
Change History (12)
- Keywords has-patch added
- Milestone changed from Awaiting Review to Future Release