|
a/Allura/allura/lib/helpers.py |
|
b/Allura/allura/lib/helpers.py |
|
... |
|
... |
106 |
project_part = n.shortname_prefix + url_path[len(n.url_prefix):] # easily off-by-one, might be better to join together everything but url_prefix
|
106 |
project_part = n.shortname_prefix + url_path[len(n.url_prefix):] # easily off-by-one, might be better to join together everything but url_prefix
|
107 |
parts = project_part.split('/')
|
107 |
parts = project_part.split('/')
|
108 |
length = len(parts)
|
108 |
length = len(parts)
|
109 |
while length:
|
109 |
while length:
|
110 |
shortname = '/'.join(parts[:length])
|
110 |
shortname = '/'.join(parts[:length])
|
111 |
p = M.Project.query.get(shortname=shortname, deleted=False)
|
111 |
p = M.Project.query.get(shortname=shortname, deleted=False,
|
|
|
112 |
neighborhood_id=n._id)
|
112 |
if p: return p, parts[length:]
|
113 |
if p: return p, parts[length:]
|
113 |
length -= 1
|
114 |
length -= 1
|
114 |
return None, url_path.split('/')
|
115 |
return None, url_path.split('/')
|
115 |
|
116 |
|
116 |
def find_executable(exe_name):
|
117 |
def find_executable(exe_name):
|