diff --git a/CONTROL/control b/CONTROL/control index afc21e3..29e3f53 100644 --- a/CONTROL/control +++ b/CONTROL/control @@ -1,7 +1,7 @@ Package: webif Priority: optional Section: web -Version: 0.8.4 +Version: 0.8.4-1 Architecture: mipsel Maintainer: af123@hummypkg.org.uk Depends: mongoose(>=3.0-2),jim(>=0.71-1),jim-sqlite3(>=0.71-1),jim-cgi(>=0.4-1),jim-oo,jim-pack,service-control,busybox(>=1.19.3-1),lsof,epg(>=1.0.8),hmt(>=1.1.1),ssmtp,anacron diff --git a/var/mongoose/cgi-bin/backup/files.jim b/var/mongoose/cgi-bin/backup/files.jim index 3b0a2a0..bc6ab95 100755 --- a/var/mongoose/cgi-bin/backup/files.jim +++ b/var/mongoose/cgi-bin/backup/files.jim @@ -20,7 +20,18 @@ if {![file isdirectory $dir]} { exit } -set backups [glob -nocomplain "$dir/*.rbk"] +proc s_time {a b} { + file stat $a l + set at $l(ctime) + file stat $b l + set bt $l(ctime) + + if {$at < $bt} { return -1 } + if {$at > $bt} { return 1 } + return 0 +} + +set backups [lsort -command s_time [glob -nocomplain "$dir/*.rbk"]] if {![llength $backups]} { empty