Permalink
Browse files

Use / suffix in text and URLs in directory listing

Signed-off-by: Ryan Tomayko <rtomayko@gmail.com>
  • Loading branch information...
1 parent a2b8481 commit db1c378de3268f7749a59dba3fd9a71ffd25a4e3 @Yonghui Yonghui committed with rtomayko Feb 25, 2009
Showing with 2 additions and 0 deletions.
  1. +2 −0 lib/rack/directory.rb
View
@@ -89,6 +89,8 @@ def list_directory
type = stat.directory? ? 'directory' : Mime.mime_type(ext)
size = stat.directory? ? '-' : filesize_format(size)
mtime = stat.mtime.httpdate
+ url << '/' if stat.directory?
+ basename << '/' if stat.directory?
@files << [ url, basename, size, type, mtime ]
end

0 comments on commit db1c378

Please sign in to comment.