Add some checks to the multidir handling.
Wed Nov 9 00:23:06 UTC 2005 Alberto Bertogli <albertogli@telpin.com.ar>
* Add some checks to the multidir handling.
Check if the entry is a directory and doesn't begin with a dot.
Besides, sort it so the listing appears in predictable order.
diff -rN -u old-darcsweb/darcsweb.cgi new-darcsweb/darcsweb.cgi
--- old-darcsweb/darcsweb.cgi 2016-01-09 21:28:28.000000000 +0000
+++ new-darcsweb/darcsweb.cgi 2016-01-09 21:28:28.000000000 +0000
@@ -1779,8 +1779,15 @@
continue
entries = os.listdir(c.multidir)
+ entries.sort()
for name in entries:
- rdir = c.multidir + '/' + name
+ if name.startswith('.'):
+ continue
+ fulldir = c.multidir + '/' + name
+ if not os.path.isdir(fulldir):
+ continue
+
+ rdir = fulldir
desc = c.repodesc % { 'name': name }
url = c.repourl % { 'name': name }
class tmp_config: