From f57e4ecb015db6b1f7f4e1db1efa76dc9b1fadcc Mon Sep 17 00:00:00 2001 From: cinap_lenrek Date: Mon, 10 Sep 2012 22:20:40 +0200 Subject: [PATCH] hgwebfs: remove prefixing // from file path --- sys/lib/python/hgext/hgwebfs.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/sys/lib/python/hgext/hgwebfs.py b/sys/lib/python/hgext/hgwebfs.py index e8eb03cba..b18cb72b7 100644 --- a/sys/lib/python/hgext/hgwebfs.py +++ b/sys/lib/python/hgext/hgwebfs.py @@ -10,8 +10,11 @@ class Webconn: else: self.url = req.get_full_url() if self.url[0:5] == 'file:': + path = self.url[5:] + while path[0:2] == '//': + path = path[1:] self.dir = '/dev/null' - self.body = open(self.url[5:], 'r', 0) + self.body = open(path, 'r', 0) return ctl = open(mnt+'/clone', 'r+', 0) try: