mirror of
https://github.com/WordPress/WordPress.git
synced 2025-03-09 07:00:01 +00:00
Don't remove top level cache dir when flushing.
git-svn-id: http://svn.automattic.com/wordpress/trunk@3402 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
9c9f5f8aaa
commit
05188cd4a0
@ -217,6 +217,7 @@ class WP_Object_Cache {
|
||||
function rm_cache_dir() {
|
||||
$dir = $this->cache_dir;
|
||||
$dir = rtrim($dir, DIRECTORY_SEPARATOR);
|
||||
$top_dir = $dir;
|
||||
$stack = array($dir);
|
||||
|
||||
while (count($stack)) {
|
||||
@ -238,7 +239,8 @@ class WP_Object_Cache {
|
||||
}
|
||||
|
||||
if (end($stack) == $dir) {
|
||||
@ rmdir($dir);
|
||||
if ( $dir != $top_dir)
|
||||
@ rmdir($dir);
|
||||
array_pop($stack);
|
||||
}
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user