? alt-title-fix-299329-32.patch ? imagecache-user-HEAD.patch Index: imagecache.module =================================================================== RCS file: /cvs/drupal-contrib/contributions/modules/imagecache/imagecache.module,v retrieving revision 1.68.2.8 diff -u -p -r1.68.2.8 imagecache.module --- imagecache.module 9 Jul 2008 02:58:07 -0000 1.68.2.8 +++ imagecache.module 7 Oct 2008 23:44:11 -0000 @@ -638,15 +638,23 @@ function _imagecache_keyword_filter($val * @param string $path * A filepath relative to file_directory_path. */ -function _imagecache_recursive_delete($dir) { - $d = dir($dir); - while (($entry = $d->read()) !== false) { - if ($entry == '.' || $entry == '..') continue; - $path = $dir .'/'. $entry; - if (is_file($path)) unlink($path); - if (is_dir($path)) _imagecache_recursive_delete($path); +function _imagecache_recursive_delete($path) { + if (is_file($path) || is_link($path)) { + unlink($path); + } + elseif (is_dir($path)) { + $d = dir($path); + while (($entry = $d->read()) !== false) { + if ($entry == '.' || $entry == '..') continue; + $entry_path = $path .'/'. $entry; + _imagecache_recursive_delete($entry_path); + } + rmdir($path); + } + else { + watchdog('imagecache', t('Unknown file type(%path) stat: %stat ', + array('%path' => $path, '%stat' => print_r(stat($path),1))), WATCHDOG_ERROR); } - rmdir($dir); } /**