changeset 1692:0399d0ecb3b9

file dpi close pre tag for empty directory listing
author corvid <corvid@lavabit.com>
date Sun, 22 Aug 2010 06:06:47 +0000
parents a0337bdbec4a
children a9a11a23d707
files dpi/file.c
diffstat 1 files changed, 4 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/dpi/file.c	Thu Aug 19 01:47:07 2010 +0000
+++ b/dpi/file.c	Sun Aug 22 06:06:47 2010 +0000
@@ -478,12 +478,10 @@
          File_info2html(client, dList_nth_data(Ddir->flist,n), n+1);
       }
 
-      if (dList_length(Ddir->flist)) {
-         if (client->old_style) {
-            a_Dpip_dsh_write_str(client->sh, 0, "</pre>\n");
-         } else {
-            a_Dpip_dsh_write_str(client->sh, 0, "</table>\n");
-         }
+      if (client->old_style) {
+         a_Dpip_dsh_write_str(client->sh, 0, "</pre>\n");
+      } else if (dList_length(Ddir->flist)) {
+         a_Dpip_dsh_write_str(client->sh, 0, "</table>\n");
       }
 
       a_Dpip_dsh_write_str(client->sh, 1, "</BODY></HTML>\n");