From 009eb100b621076b0741946a75d84f7c3ec9a222 Mon Sep 17 00:00:00 2001 From: hummypkg Date: Sat, 21 Sep 2013 20:50:58 +0000 Subject: [PATCH] update git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1695 2a923420-c742-0410-a762-8d5b09965624 --- CONTROL/control | 2 +- var/mongoose/lib/epg.class | 2 +- var/mongoose/lib/system.class | 16 +++++++++++----- 3 files changed, 13 insertions(+), 7 deletions(-) diff --git a/CONTROL/control b/CONTROL/control index 56a1f8d..41f582f 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 1.0.6-5 +Version: 1.0.6-8 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: webif-channelicons(>=1.1.4),mongoose(>=3.0-9),jim(>=0.73-1),jim-oo,jim-sqlite3(>=0.73-1),jim-cgi(>=0.7),jim-binary,service-control(>=1.2),busybox(>=1.20.2-1),lsof,epg(>=1.0.13),hmt(>=1.1.14),ssmtp,anacron,trm(>=1.1),openssl-command,nicesplice,id3v2,file,rsvsync(>=1.0.2),webif-charts(>=1.2),stripts(>=1.2.3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6) diff --git a/var/mongoose/lib/epg.class b/var/mongoose/lib/epg.class index 758814a..1003806 100644 --- a/var/mongoose/lib/epg.class +++ b/var/mongoose/lib/epg.class @@ -218,7 +218,7 @@ epg method icon_set {{height 0}} { set icon [$self type_icon] set set "" if {$icon != ""} { - lappend set "\"$content_type\"" } diff --git a/var/mongoose/lib/system.class b/var/mongoose/lib/system.class index 85219c2..7fd4ac9 100644 --- a/var/mongoose/lib/system.class +++ b/var/mongoose/lib/system.class @@ -228,17 +228,23 @@ proc {system mkdir_p} {dir} { exec /mod/bin/busybox/mkdir -p $dir } -proc {system rmdir_if_empty} {dir} { +proc {system rmdir_if_empty} {dir {why 0}} { + set fl {} foreach e [readdir -nocomplain $dir] { if {$e eq "." || $e eq ".."} continue if {[file isdirectory "$dir/$e"]} { - return 0 + if {!$why} { return 0 } + lappend fl $e } elseif {[string index $e 0] ne "."} { - return 0 + if {!$why} { return 0 } + lappend fl $e } } - file delete -force $dir - return 1 + if {!$why} { + file delete -force $dir + return 1 + } + return $fl } proc {system listening} {{mport 0}} {