Ignore TSR buffer size when disabled

This commit is contained in:
prpr 2022-10-15 22:07:34 +01:00
parent 203430c224
commit 00e8a342c0

View File

@ -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