shithub: riscv

Download patch

ref: 20b8f1e777d04ce7daa771ee75092192d3120bda
parent: 21f97338f86b9aa4a2995ddc7bbe539efadfab70
author: stanley lieber <[email protected]>
date: Thu May 14 17:04:51 EDT 2015

rc-httpd/handlers/dir-index: plan 9 files may be chmod +a:

          The mode printed under the -l option contains 11 characters,
          interpreted as follows: the first character is

          d    if the entry is a directory;

          a    if the entry is an append-only file;

          -    if the entry is a plain file.

Therefore, handle them in automatically generated directory listings.

--- a/rc/bin/rc-httpd/handlers/dir-index
+++ b/rc/bin/rc-httpd/handlers/dir-index
@@ -82,7 +82,7 @@
 	if(size > 1024) return sprintf("%.1fKB", size/1024)
 	return sprintf("%iB", size)
 }
-/^-/ {
+/^(-|a)/ {
 	print "<tr>"
 	print "<td class=\"size\">"hrsize($6)"</td>"
 	print "<td class=\"month\">"$7"</td>"