handle an empty relpath correctly
This commit is contained in:
parent
e8aa28234d
commit
68dd16db6d
3 changed files with 10 additions and 2 deletions
|
|
@ -1390,6 +1390,14 @@ class PathInfo(object):
|
|||
"""Return the directory where the Windows build exists"""
|
||||
return self.build(build) + '/win'
|
||||
|
||||
def winfile(self, wininfo):
|
||||
"""Return the relative path from the winbuild directory where the
|
||||
file identified by wininfo is located."""
|
||||
filepath = wininfo['filename']
|
||||
if wininfo.get('relpath'):
|
||||
filepath = wininfo['relpath'] + '/' + filepath
|
||||
return filepath
|
||||
|
||||
def mavenrepo(self, build, maveninfo):
|
||||
"""Return the directory where the Maven artifact exists in the per-tag Maven repo
|
||||
(/mnt/koji/repos/tag-name/repo-id/maven2/)"""
|
||||
|
|
|
|||
|
|
@ -13,7 +13,7 @@
|
|||
</tr>
|
||||
<tr>
|
||||
#if $wininfo
|
||||
<th>File Name</th><td>$wininfo.relpath/$archive.filename</td>
|
||||
<th>File Name</th><td>$koji.pathinfo.winfile($archive)</td>
|
||||
#else
|
||||
<th>File Name</th><td>$archive.filename</td>
|
||||
#end if
|
||||
|
|
|
|||
|
|
@ -174,7 +174,7 @@
|
|||
#if $mavenbuild
|
||||
$archive.filename (<a href="archiveinfo?archiveID=$archive.id">info</a>) (<a href="$archiveurl/$archive.filename">download</a>)
|
||||
#elif $winbuild
|
||||
$archive.relpath/$archive.filename (<a href="archiveinfo?archiveID=$archive.id">info</a>) (<a href="$downloadBase/$nvrpath/win/$archive.relpath/$archive.filename">download</a>)
|
||||
$koji.pathinfo.winfile($archive) (<a href="archiveinfo?archiveID=$archive.id">info</a>) (<a href="$downloadBase/$nvrpath/win/$koji.pathinfo.winfile($archive)">download</a>)
|
||||
#end if
|
||||
</td>
|
||||
</tr>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue