append / to directory links to avoid unnecessary redirects
authorFelix Fietkau <nbd@openwrt.org>
Tue, 1 Jan 2013 14:56:05 +0000 (15:56 +0100)
committerFelix Fietkau <nbd@openwrt.org>
Tue, 1 Jan 2013 14:56:05 +0000 (15:56 +0100)
file.c

diff --git a/file.c b/file.c
index b2cfd8d..0fb17d6 100644 (file)
--- a/file.c
+++ b/file.c
@@ -468,7 +468,7 @@ static void uh_file_dirlist(struct client *cl, struct path_info *pi)
                        if (!stat(filename, &s) &&
                                (s.st_mode & S_IFDIR) && (s.st_mode & S_IXOTH))
                                uh_chunk_printf(cl,
-                                       "<li><strong><a href='%s%s'>%s</a>/"
+                                       "<li><strong><a href='%s%s/'>%s</a>/"
                                        "</strong><br /><small>modified: %s"
                                        "<br />directory - %.02f kbyte<br />"
                                        "<br /></small></li>",