Fix FS#11187 *correctly*. Signed-off-by: Dan McGee <dan@archlinux.org> --- web/lib/aur.inc | 10 +++++----- 1 files changed, 5 insertions(+), 5 deletions(-) diff --git a/web/lib/aur.inc b/web/lib/aur.inc index ade5b82..d0c2bc2 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -377,11 +377,11 @@ function rm_rf($dirname="") { $d = dir($dirname); while ($f = $d->read()) { if ($f != "." && $f != "..") { - if (is_dir($dirname."/".$f)) { - rm_rf($dirname."/".$f); - } - if (is_file($dirname."/".$f) || is_link($dirname."/".$f)) { - unlink($dirname."/".$f); + $fullpath = $dirname."/".$f; + if (is_file($fullpath) || is_link($fullpath)) { + unlink($fullpath); + } elseif (is_dir($fullpath)) { + rm_rf($fullpath); } } } -- 1.6.0.3