ezsystems/ezpublish — pull request #290 by zeitounator (2012-02-17 01:10:07+00:00)
Title: Recursive delete should work with cache dir on absolute path

How to observe and reproduce:
- Set CacheDir with an absolute path (outside of ez root) directory in site.ini (e.g. /my/abs/cache)
- Compile some templates (either by browsing or using bin/php/eztc.php) => templates are compiled in /my/abs/cache/template/compiled
- Empty the template cache (php bin/php/ezcache.php --clear-id=template)

Expected result:
directory /my/abs/cache/template doesn't exist anymore

Actual result:
directory still exist with all compiled templates still there

This patch will let the script recursively delete the dir (and any other) if it is part of the defined CacheDir.