hgwebfs: remove prefixing // from file path
This commit is contained in:
parent
b62042cdeb
commit
f57e4ecb01
1 changed files with 4 additions and 1 deletions
|
@ -10,8 +10,11 @@ class Webconn:
|
||||||
else:
|
else:
|
||||||
self.url = req.get_full_url()
|
self.url = req.get_full_url()
|
||||||
if self.url[0:5] == 'file:':
|
if self.url[0:5] == 'file:':
|
||||||
|
path = self.url[5:]
|
||||||
|
while path[0:2] == '//':
|
||||||
|
path = path[1:]
|
||||||
self.dir = '/dev/null'
|
self.dir = '/dev/null'
|
||||||
self.body = open(self.url[5:], 'r', 0)
|
self.body = open(path, 'r', 0)
|
||||||
return
|
return
|
||||||
ctl = open(mnt+'/clone', 'r+', 0)
|
ctl = open(mnt+'/clone', 'r+', 0)
|
||||||
try:
|
try:
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue