From 3312a76cc64009daa6e22ec09845d91287dfc6b3 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Fri, 13 Jan 2012 23:28:48 +0000 Subject: [PATCH] dynamic dustbin git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@661 2a923420-c742-0410-a762-8d5b09965624 --- var/mongoose/lib/system.class | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/var/mongoose/lib/system.class b/var/mongoose/lib/system.class index 3b98489..9cbe0e4 100644 --- a/var/mongoose/lib/system.class +++ b/var/mongoose/lib/system.class @@ -51,11 +51,12 @@ proc {system mediaroot} {} { } proc {system dustbin} {} { - switch [system model] { - HDR { return "/media/My Video/_dustbin" } - HD { return "/media/drive1/Video/_dustbin" } + set dustbin "_dustbin" + if {![catch {set fd [open "/mod/boot/dustbin.name" r]}]} { + set dustbin [lindex [split [read $fd] "\n"] 0] + $fd close } - return "" + return "[system mediaroot]/$dustbin" } proc {system diskspace} {} {