# HG changeset patch # User terom # Date 1194813545 0 # Node ID a0a13d5e406c97dc9a3a58ef53ec936168b68a44 # Parent 4e71e1b670bc22a99217e7176c3f8f7ee3324951 ShortURLs for dirs without page numbers were broken, as fname was 'index' diff -r 4e71e1b670bc -r a0a13d5e406c shorturl.cgi --- a/shorturl.cgi Thu Nov 08 21:25:01 2007 +0000 +++ b/shorturl.cgi Sun Nov 11 20:39:05 2007 +0000 @@ -18,14 +18,16 @@ try : type, dirpath, fname = db[key] + if type == 'img' : + fname += '.html' + elif type == 'dir' : + fname = '' + if index : if index > 1 : - fname += 'index_%s.html' % (index - 1) + fname = 'index_%s.html' % (index - 1) dirpath = '../%s' % dirpath - - if type == 'img' : - fname += '.html' path = os.path.join(dirpath, fname) finally :