diff --git a/webif/lib/auto/plugin/expire/auto.hook b/webif/lib/auto/plugin/expire/auto.hook
index 3645fd1..d4f69ed 100755
--- a/webif/lib/auto/plugin/expire/auto.hook
+++ b/webif/lib/auto/plugin/expire/auto.hook
@@ -22,8 +22,13 @@ proc ::expire::directory {dir} {
set entries [lsort \
-command [lambda {a b} {upvar getter g; expr {[$g $a] - [$g $b]}}]\
[lmap i [readdir -nocomplain $dir] {
- if {![string match {*.ts} $i]} continue
- if {[catch {set ts [ts fetch "$dir/$i"]}]} continue
+ if {[string match {*.hmt} $i]} {
+ if {[file exists "[file rootname $i].ts"]} continue
+ if {[catch {set ts [ts parse "$dir/$i" [ts exec "$dir/$i"]]}]}\
+ continue
+ } elseif {[string match {*.ts} $i]} {
+ if {[catch {set ts [ts fetch "$dir/$i"]}]} continue
+ } else continue
if {$ts == 0} continue
list $ts
}]]
@@ -43,13 +48,15 @@ proc ::expire::directory {dir} {
break
}
log " [file tail $file]"
- if {[::auto::inuse $ts]} {
- log " In use, skipping."
- continue
- }
- if {$ax(keepnew) ne "0" && [$ts flag New]} {
- log " Unwatched, skipping."
- continue
+ if {[string match {*.ts} $file]} {
+ if {[::auto::inuse $ts]} {
+ log " In use, skipping."
+ continue
+ }
+ if {$ax(keepnew) ne "0" && [$ts flag New]} {
+ log " Unwatched, skipping."
+ continue
+ }
}
if {$ax(days) > 0} {
# Calculate age in days
diff --git a/webif/lib/ts.class b/webif/lib/ts.class
index e60c103..0eb3357 100644
--- a/webif/lib/ts.class
+++ b/webif/lib/ts.class
@@ -271,7 +271,7 @@ proc {ts fetch} {file {checked 0}} {
ts method delete {} {
foreach f [$self fileset] {
file tdelete $f
- puts "Removed $f
"
+ #puts "Removed $f
"
}
return 1
}