mercurial/hgweb/hgwebdir_mod.py
branchstable
changeset 25426 5f3666da6910
parent 25396 78e8890cfb4b
child 25427 d0c7ffc4c8bc
--- a/mercurial/hgweb/hgwebdir_mod.py	Wed Jun 03 14:29:11 2015 -0700
+++ b/mercurial/hgweb/hgwebdir_mod.py	Mon Jun 01 18:06:20 2015 -0400
@@ -292,6 +292,12 @@
                         # remove name parts plus accompanying slash
                         path = path[:-len(discarded) - 1]
 
+                        try:
+                            r = hg.repository(self.ui, path)
+                            directory = False
+                        except (IOError, error.RepoError):
+                            pass
+
                 parts = [name]
                 if 'PATH_INFO' in req.env:
                     parts.insert(0, req.env['PATH_INFO'].rstrip('/'))