ref: 8b3f4d8a37dce7944e0fb5ca716ad6eadbe7d7d8
parent: f9f905d83fafacf2f62f88dabd49f7488ed605ca
author: stanley lieber <stanley.lieber@gmail.com>
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>"
--
⑨