preserve more timestamps

git-svn-id: file:///root/webif/svn/humax/pkg/src/webif/trunk@1832 2a923420-c742-0410-a762-8d5b09965624
This commit is contained in:
hummypkg 2014-04-02 21:14:23 +00:00
parent 604ac65172
commit e0ac834c78
5 changed files with 25 additions and 1 deletions

View File

@ -1,7 +1,7 @@
Package: webif
Priority: optional
Section: web
Version: 1.0.10-4
Version: 1.0.10-5
Architecture: mipsel
Maintainer: af123@hummypkg.org.uk
Depends: webif-channelicons(>=1.1.10),mongoose(>=3.0.11),jim(>=0.75-1),jim-oo,jim-sqlite3(>=0.75),jim-cgi(>=0.7),jim-binary(>=0.75),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.5-3),smartmontools,tmenu(>=1.05),ffmpeg,id3v2,multienv(>=1.6)

View File

@ -50,12 +50,14 @@ foreach ext $tsgroup {
}
file rename "$rfile.decrypting" $rfile
file touch $rfile "$origdir/$tail.ts"
foreach ext {nts hmt thm} {
set sidecar "$shname.$ext"
if {[file exists "$origdir/$sidecar"]} {
puts "Copying back sidecar $ext"
file copy "$origdir/$sidecar" "$dir/$sidecar"
file touch "$dir/$sidecar" "$origdir/$tail.ts"
}
}

View File

@ -40,6 +40,10 @@ puts [exec /mod/bin/stripts \
"$dir/$shname" \
]
# Set the file time to match the old file
ts touchgroup "$dir/$shname.ts" "$origdir/$shname.ts"
set newname "$shname-[clock seconds]"
puts "Renaming file group to $newname"
ts renamegroup "$dir/$shname.ts" $newname

View File

@ -239,6 +239,8 @@ proc do_shrink {ts} {
foreach f [glob "$tmp/shrunk.*"] {
set ext [file extension $f]
file rename $f "${file}_shrunk${ext}"
# Set the file time to match the old file
file touch "${file}_shrunk${ext}" [$ts get file]
}
# Remove the old recording (-> bin if undelete is installed)

View File

@ -318,6 +318,22 @@ proc {ts renamegroup} {from to} {
}
}
proc {ts touchgroup} {target ref} {
global tsgroup
set dir [file dirname $target]
set root [file rootname $target]
# Catch from string without a . character in it
if {$root eq $target} { return }
foreach ext $tsgroup {
set f "$root.$ext"
if {![file exists $f]} continue
file touch $f $ref
}
}
proc {ts genrelist} {} {
return {
0 { Unclassified Unclassified }