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:
ryan 2006-01-05 04:50:58 +00:00
parent 9c9f5f8aaa
commit 05188cd4a0

View File

@ -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);
}
}