mirror of
https://github.com/edgelesssys/constellation.git
synced 2025-08-08 23:12:18 -04:00
versionsapi: fix shortPath implementation
Signed-off-by: Paul Meyer <49727155+katexochen@users.noreply.github.com>
This commit is contained in:
parent
6dad94137b
commit
f17b40b44a
2 changed files with 10 additions and 3 deletions
|
@ -320,12 +320,14 @@ var (
|
|||
func shortPath(ref, stream, version string) string {
|
||||
var sp string
|
||||
if ref != ReleaseRef {
|
||||
sp = path.Join("ref", ref)
|
||||
return path.Join("ref", ref, "stream", stream, version)
|
||||
}
|
||||
|
||||
if stream != "stable" {
|
||||
sp = path.Join(sp, "stream", stream)
|
||||
return path.Join(sp, "stream", stream, version)
|
||||
}
|
||||
return path.Join(sp, version)
|
||||
|
||||
return version
|
||||
}
|
||||
|
||||
func parseShortPath(shortPath string) (ref, stream, version string, err error) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue