diff --git a/models/repo/repo.go b/models/repo/repo.go index efbd6812a1..258eebc653 100644 --- a/models/repo/repo.go +++ b/models/repo/repo.go @@ -681,6 +681,9 @@ func getGroupSegment(gid int64) string { } func groupSegmentWithTrailingSlash(gid int64) string { + if gid < 1 { + return "" + } return getGroupSegment(gid) + "/" }