From 81c3ef4f73fae081b62f1d24112154e09a0fed4a Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sat, 20 Aug 2011 21:30:43 +0000 Subject: [PATCH] support same directory symlinks git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@294 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/cgi-bin/browse/sizes.jim | 3 +++ 1 file changed, 3 insertions(+) diff --git a/var/mongoose/cgi-bin/browse/sizes.jim b/var/mongoose/cgi-bin/browse/sizes.jim index b11ee12..0b9f813 100755 --- a/var/mongoose/cgi-bin/browse/sizes.jim +++ b/var/mongoose/cgi-bin/browse/sizes.jim @@ -27,6 +27,9 @@ foreach line [split [exec /mod/bin/busybox/du -h "$dir/"] "\n"] { # Handle symbolic links. foreach file [glob -nocomplain "$dir/*"] { if {[catch {set lk [file readlink $file]}]} continue + + if {![string match "/*" $lk]} { set lk "$dir/$lk" } + if {![file isdirectory $lk]} continue foreach line [split [exec /mod/bin/busybox/du -h "$lk"] "\n"] { set fields [split $line "\t"]