[wp-trac] [WordPress Trac] #22856: Twenty Twelve upgrade issues
WordPress Trac
noreply at wordpress.org
Wed Jan 2 06:16:27 UTC 2013
#22856: Twenty Twelve upgrade issues
-----------------------------+--------------------
Reporter: nacin | Owner:
Type: defect (bug) | Status: new
Priority: normal | Milestone: 3.5.1
Component: Upgrade/Install | Version:
Severity: normal | Resolution:
Keywords: |
-----------------------------+--------------------
Comment (by nacin):
> For 3.5.1, it seems like we have two options:
>
> 1. Detect an empty directory and delete it, clearing the path for Twenty
Twelve to be installed.
> 2. Detect an empty directory and install the actual Twenty Twelve over
it.
Looking at [attachment:22856.5.diff], I was actually thinking this was
something for admin/includes/update-core.php. In that case, we can "detect
an empty directory" by simply looking for the existence of the
twentytwelve directory and the nonexistence of twentytwelve/style.css and
index.php. Then, just delete the directory with `$wp_filesystem->delete(
$path_to_twentytwelve, false )`, which will fire an `rmdir`, which will
simply fail if the directory isn't empty.
I think that is nicer than a glob() at run-time.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/22856#comment:12>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list