mirror of
git://git.9front.org/plan9front/plan9front
synced 2025-01-12 11:10:06 +00:00
support file:// urls in hgwebfs extension as apparently hg uses them. m(
This commit is contained in:
parent
72c1608409
commit
aead11533e
1 changed files with 8 additions and 1 deletions
|
@ -5,9 +5,16 @@ import re
|
|||
|
||||
class Webconn:
|
||||
def __init__(self, mnt, req):
|
||||
if type(req) == str:
|
||||
self.url = req
|
||||
else:
|
||||
self.url = req.get_full_url()
|
||||
if self.url[0:5] == 'file:':
|
||||
self.dir = '/dev/null'
|
||||
self.body = open(self.url[5:], 'r', 0)
|
||||
return
|
||||
ctl = open(mnt+'/clone', 'r+', 0)
|
||||
try:
|
||||
self.url = req.get_full_url()
|
||||
self.dir = mnt+'/'+ctl.readline().rstrip('\n')
|
||||
ctl.seek(0)
|
||||
ctl.write('url '+self.url)
|
||||
|
|
Loading…
Reference in a new issue