changeset 26846 | 7c1b4840c2cd |
parent 26200 | 461e7b700fdf |
child 27046 | 37fcfe52c68c |
--- a/mercurial/hgweb/request.py Mon Nov 02 23:37:14 2015 +0800 +++ b/mercurial/hgweb/request.py Mon Nov 02 23:37:49 2015 +0800 @@ -80,7 +80,7 @@ if self._start_response is not None: self.headers.append(('Content-Type', type)) if filename: - filename = (filename.split('/')[-1] + filename = (filename.rpartition('/')[-1] .replace('\\', '\\\\').replace('"', '\\"')) self.headers.append(('Content-Disposition', 'inline; filename="%s"' % filename))