mirror of
git://git.yoctoproject.org/layerindex-web.git
synced 2025-07-19 20:59:01 +02:00
Fix web subdirectory links with gitweb
gitweb, ever vigilant for the slightest transgression in URL syntax, fails to find the specified path if it is a directory and has a trailing slash, so we need to avoid adding this. Signed-off-by: Paul Eggleton <paul.eggleton@linux.intel.com>
This commit is contained in:
parent
cd7e00bf57
commit
2804211f8f
|
@ -136,7 +136,10 @@ class LayerBranch(models.Model):
|
||||||
def _handle_url_path(self, base_url, path):
|
def _handle_url_path(self, base_url, path):
|
||||||
if base_url:
|
if base_url:
|
||||||
if self.vcs_subdir:
|
if self.vcs_subdir:
|
||||||
|
if path:
|
||||||
extra_path = self.vcs_subdir + '/' + path
|
extra_path = self.vcs_subdir + '/' + path
|
||||||
|
else:
|
||||||
|
extra_path = self.vcs_subdir
|
||||||
else:
|
else:
|
||||||
extra_path = path
|
extra_path = path
|
||||||
url = base_url.replace('%branch%', self.branch.name)
|
url = base_url.replace('%branch%', self.branch.name)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user