summaryrefslogtreecommitdiff
path: root/sys/lib/python/hgext
diff options
context:
space:
mode:
authorcinap_lenrek <cinap_lenrek@gmx.de>2012-09-10 22:20:40 +0200
committercinap_lenrek <cinap_lenrek@gmx.de>2012-09-10 22:20:40 +0200
commitf57e4ecb015db6b1f7f4e1db1efa76dc9b1fadcc (patch)
treee86d2c43bba1988cdcfed0f3474228b3c42a8de6 /sys/lib/python/hgext
parentb62042cdebfe221eb78245ee756d0f0dfde9cc9d (diff)
hgwebfs: remove prefixing // from file path
Diffstat (limited to 'sys/lib/python/hgext')
-rw-r--r--sys/lib/python/hgext/hgwebfs.py5
1 files changed, 4 insertions, 1 deletions
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: