diff options
author | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-10 22:20:40 +0200 |
---|---|---|
committer | cinap_lenrek <cinap_lenrek@gmx.de> | 2012-09-10 22:20:40 +0200 |
commit | f57e4ecb015db6b1f7f4e1db1efa76dc9b1fadcc (patch) | |
tree | e86d2c43bba1988cdcfed0f3474228b3c42a8de6 /sys/lib/python | |
parent | b62042cdebfe221eb78245ee756d0f0dfde9cc9d (diff) |
hgwebfs: remove prefixing // from file path
Diffstat (limited to 'sys/lib/python')
-rw-r--r-- | sys/lib/python/hgext/hgwebfs.py | 5 |
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: |