From: Dan McGee <dan@archlinux.org> Signed-off-by: Dan McGee <dan@archlinux.org> --- web/lib/aur.inc | 9 +++++---- 1 files changed, 5 insertions(+), 4 deletions(-) diff --git a/web/lib/aur.inc b/web/lib/aur.inc index 81ffde2..b243cc4 100644 --- a/web/lib/aur.inc +++ b/web/lib/aur.inc @@ -378,11 +378,12 @@ function rm_rf($dirname="") { $d = dir($dirname); while ($f = $d->read()) { if ($f != "." && $f != "..") { - if (is_dir($dirname."/".$f)) { - rm_rf($dirname."/".$f); + $fullpath = $dirname."/".$f; + if (is_dir($fullpath)) { + rm_rf($fullpath); } - if (is_file($dirname."/".$f) || is_link($dirname."/".$f)) { - unlink($dirname."/".$f); + if (is_file($fullpath) || is_link($fullpath)) { + unlink($fullpath); } } } -- 1.6.0.3