diff --git a/webif/lib/system.class b/webif/lib/system.class index dbb30a6..71fbc3e 100644 --- a/webif/lib/system.class +++ b/webif/lib/system.class @@ -477,20 +477,13 @@ proc {system diskspace} {{raw 0}} { set perc $($used * 100 / $size) set fperc $(100 - $perc) - set tsrdir [system tsrdir] - switch [system model] { - HDR { - set tsrok [file isdirectory $tsrdir] - } - HD { - set tsrok [file exists "$tsrdir/0.ts"] - } + if {[catch {set tsrts [file size [system tsr]]}]} { + set tsrts 0 } - - if {$tsrok} { + if {[expr {$tsrts > 0}]} { set tsrbuf 21474836480 if {[catch { - lassign [exec du -ks $tsrdir] tsrused + lassign [exec du -ks [system tsrdir]] tsrused }]} { set tsrused 0 set tsrbuf 0