Add reverse sort by date

This commit is contained in:
HummyPkg 2017-12-08 09:09:46 +00:00
parent b6eceebc26
commit ff846fb6d0

View File

@ -330,6 +330,7 @@ proc s_time {a b} {
set files [readdir -nocomplain $dir]
switch $order {
1 { set files [lsort -command s_time $files] }
2 { set files [lreverse [lsort -command s_time $files]] }
default { set files [lsort -nocase $files] }
}
@ -344,7 +345,7 @@ Directories: $dircount, Files: $filecount
# Sort icons
puts "<div id=sortdiv>"
set sortlist {{0 sort_name name} {1 sort_date date}}
set sortlist {{0 sort_name name} {1 sort_date date} {2 sort_date reverse-date}}
foreach sl $sortlist {
lassign $sl index img descr